File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
server/src/main/java/org/opensearch/indices/replication/common Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ public CopyState(IndexShard shard) throws IOException {
4949 SegmentInfos segmentInfosSnapshot = segmentInfos .clone ();
5050 Map <String , String > userData = segmentInfosSnapshot .getUserData ();
5151 long maxSeqNo = Long .parseLong (userData .getOrDefault (SequenceNumbers .MAX_SEQ_NO , "-1" ));
52- // In the scenario of vanilla segment replication . We need to ensure that after the primary promotion,
53- // the SegmentInfos#version of the primary shard is always greater than or equal to that of the replicas.
54- // At the same time, it is also necessary to ensure that there is no risk of data loss .
52+ // In the scenario of primary promotion . We need to ensure that the SegmentInfos#version of the new primary shard
53+ // is greater than or equal to that of the replicas, and also need to ensure that the local_checkpoint of the new
54+ // primary shard is less than or equal to the checkpoint of the Lucene commit .
5555 userData .put (SequenceNumbers .MAX_SEQ_NO , Long .toString (Math .min (maxSeqNo , lastRefreshedCheckpoint )));
5656 segmentInfosSnapshot .setUserData (userData , false );
5757
You can’t perform that action at this time.
0 commit comments