Commit 855fa94
authored
Fix read issue on concurrent open after truncate (#1781)
Fix race condition when 2 concurrent open requests occur after a
truncate and resulting in errors on read.
The issue is caused by a concurrent operation which ignores that the
inode is still completing an upload and tries to refresh its state by
performing a remote lookup to the bucket. By the time the remote lookup
completes, its result may be stale but still be used to overwrite the
result of the upload. This fix adds a check for a pending upload instead
of only relying on the `write_status` field.
### Does this change impact existing behavior?
No.
### Does this change need a changelog entry? Does it require a version
change?
Added changelog entries for a patch release.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).
---------
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>1 parent 90bb0b4 commit 855fa94
File tree
4 files changed
+100
-16
lines changed- mountpoint-s3-fs
- src
- tests/fuse_tests
- mountpoint-s3
4 files changed
+100
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
| 851 | + | |
851 | 852 | | |
852 | | - | |
853 | | - | |
| 853 | + | |
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
877 | 886 | | |
878 | 887 | | |
879 | 888 | | |
| |||
1670 | 1679 | | |
1671 | 1680 | | |
1672 | 1681 | | |
| 1682 | + | |
| 1683 | + | |
1673 | 1684 | | |
1674 | | - | |
| 1685 | + | |
1675 | 1686 | | |
1676 | 1687 | | |
1677 | 1688 | | |
| |||
1758 | 1769 | | |
1759 | 1770 | | |
1760 | 1771 | | |
1761 | | - | |
| 1772 | + | |
| 1773 | + | |
1762 | 1774 | | |
1763 | 1775 | | |
1764 | 1776 | | |
1765 | | - | |
| 1777 | + | |
1766 | 1778 | | |
1767 | 1779 | | |
1768 | 1780 | | |
| |||
1776 | 1788 | | |
1777 | 1789 | | |
1778 | 1790 | | |
1779 | | - | |
| 1791 | + | |
1780 | 1792 | | |
1781 | 1793 | | |
1782 | | - | |
| 1794 | + | |
1783 | 1795 | | |
1784 | 1796 | | |
1785 | 1797 | | |
| |||
1799 | 1811 | | |
1800 | 1812 | | |
1801 | 1813 | | |
1802 | | - | |
| 1814 | + | |
1803 | 1815 | | |
1804 | 1816 | | |
1805 | 1817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1177 | 1245 | | |
1178 | 1246 | | |
1179 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
0 commit comments