Commit e1a4125
authored
Fix testReplicaHasDiffFilesThanPrimary. (#8863)
This test is failing in two ways.
First it fails when copying segments from the remote store and there is a cksum mismatch. In this case
it is not guaranteed the directory implementation will replace the existing file when copying from the store. This change ensures the mismatched file is cleaned up but only if the shard is not serving reads. In that case we fail the shard so it is re-recovered rather than deleting the segment underneath it.
This test also fails with a divide by 0 in RemoteStoreRefreshListener.
Signed-off-by: Marc Handalian <[email protected]>1 parent 1b5e64a commit e1a4125
File tree
2 files changed
+10
-3
lines changed- server/src/main/java/org/opensearch/index/shard
2 files changed
+10
-3
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4808 | 4808 | | |
4809 | 4809 | | |
4810 | 4810 | | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
4811 | 4819 | | |
4812 | 4820 | | |
4813 | 4821 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
461 | | - | |
| 460 | + | |
462 | 461 | | |
463 | 462 | | |
464 | | - | |
| 463 | + | |
465 | 464 | | |
466 | 465 | | |
467 | 466 | | |
| |||
0 commit comments