Commit 82b1f10
authored
SNAPSHOT+TESTS: Rem. Mock Atomic Writes Randomness (#37011)
* Randomly doing non-atomic writes causes rare 0 byte reads from `index-N` files in tests
* Removing this randomness fixes these random failures and is valid because it does not reproduce a real-world failure-mode:
* Cloud-based Blob stores (S3, GCS, and Azure) do not have inconsistent partial reads of a blob, either you read a complete blob or nothing on them
* For file system based blob stores the atomic move we do (to atomically write a file) by setting `java.nio.file.StandardCopyOption#ATOMIC_MOVE` would throw if the file system does not provide for atomic moves
* Closes #370051 parent edb4832 commit 82b1f10
File tree
2 files changed
+10
-22
lines changed- server/src/test/java/org/elasticsearch/snapshots
- mockstore
2 files changed
+10
-22
lines changedLines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3179 | 3179 | | |
3180 | 3180 | | |
3181 | 3181 | | |
3182 | | - | |
3183 | 3182 | | |
3184 | 3183 | | |
3185 | 3184 | | |
| |||
3244 | 3243 | | |
3245 | 3244 | | |
3246 | 3245 | | |
3247 | | - | |
3248 | 3246 | | |
3249 | 3247 | | |
3250 | 3248 | | |
| |||
Lines changed: 10 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| |||
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | | - | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
| |||
361 | 358 | | |
362 | 359 | | |
363 | 360 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
378 | 368 | | |
379 | | - | |
380 | | - | |
| 369 | + | |
| 370 | + | |
381 | 371 | | |
382 | | - | |
| 372 | + | |
383 | 373 | | |
384 | 374 | | |
385 | 375 | | |
| |||
0 commit comments