Skip to content

Commit f3fec76

Browse files
committed
update
Signed-off-by: guojialiang <[email protected]>
1 parent 740deb3 commit f3fec76

File tree

1 file changed

+1
-1
lines changed
  • server/src/main/java/org/opensearch/indices/replication/common

1 file changed

+1
-1
lines changed

server/src/main/java/org/opensearch/indices/replication/common/CopyState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public CopyState(IndexShard shard) throws IOException {
4848

4949
SegmentInfos segmentInfosSnapshot = segmentInfos.clone();
5050
Map<String, String> userData = segmentInfosSnapshot.getUserData();
51-
long maxSeqNo = Long.parseLong(userData.get(SequenceNumbers.MAX_SEQ_NO));
51+
long maxSeqNo = Long.parseLong(userData.getOrDefault(SequenceNumbers.MAX_SEQ_NO, "-1"));
5252
userData.put(SequenceNumbers.MAX_SEQ_NO, Long.toString(Math.min(maxSeqNo, lastRefreshedCheckpoint)));
5353
segmentInfosSnapshot.setUserData(userData, false);
5454

0 commit comments

Comments
 (0)