Commit 6b0d534
authored
Fix a racing condition in shard snapshot status update (elastic#130302)
The enqueued task can run before the code reaches the status update
line. When it happens, the status update can set the status backwards.
This PR fixes it by moving the status update before enqueuing the task.
Resolves: elastic#1297521 parent fe75f8d commit 6b0d534
File tree
2 files changed
+1
-4
lines changed- server/src/main/java/org/elasticsearch/snapshots
2 files changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | 527 | | |
531 | 528 | | |
532 | 529 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
432 | | - | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| |||
0 commit comments