Skip to content

Commit

Permalink
Fix broken test.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Mar 13, 2023
1 parent ccd5694 commit b32f94d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,16 @@ public void testReplicaReceivesLowerGeneration() throws Exception {
IndexShard oldPrimary = shards.addReplicaWithExistingPath(primary.shardPath(), primary.routingEntry().currentNodeId());
shards.recoverReplica(oldPrimary);
assertLatestCommitGen(5, oldPrimary);
assertLatestCommitGen(5, replica_2);
// commitGen is now 6 instead of 5 bc IE will trim any retained unsafe commits from the replica.
// This now happens as readers incref existing segments.
assertLatestCommitGen(6, replica_2);

numDocs = randomIntBetween(numDocs + 1, numDocs + 10);
shards.indexDocs(numDocs);
flushShard(replica_2, false);
replicateSegments(replica_2, shards.getReplicas());
assertEqualCommittedSegments(replica_2, oldPrimary, replica_1);
logger.info("Replica_1 {}", List.of(replica_1.store().directory().listAll()));
}
}

Expand Down

0 comments on commit b32f94d

Please sign in to comment.