Commit d9051c3
committed
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#129752
(cherry picked from commit 6b0d534)
# Conflicts:
# muted-tests.yml1 parent 1d68fc2 commit d9051c3
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 | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | 515 | | |
519 | 516 | | |
520 | 517 | | |
| |||
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