File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
server/src/main/java/org/elasticsearch/index/shard Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1386,7 +1386,7 @@ public CommitStats commitStats() {
13861386 * @throws AlreadyClosedException if shard is closed
13871387 */
13881388 public SeqNoStats seqNoStats () {
1389- return getEngine () .getSeqNoStats (replicationTracker .getGlobalCheckpoint ());
1389+ return withEngine ( engine -> engine .getSeqNoStats (replicationTracker .getGlobalCheckpoint () ));
13901390 }
13911391
13921392 public IndexingStats indexingStats () {
@@ -3061,7 +3061,7 @@ public void maybeSyncGlobalCheckpoint(final String reason) {
30613061 }
30623062 assert assertPrimaryMode ();
30633063 // only sync if there are no operations in flight, or when using async durability
3064- final SeqNoStats stats = getEngine () .getSeqNoStats (replicationTracker .getGlobalCheckpoint ());
3064+ final SeqNoStats stats = withEngine ( engine -> engine .getSeqNoStats (replicationTracker .getGlobalCheckpoint () ));
30653065 final boolean asyncDurability = indexSettings ().getTranslogDurability () == Translog .Durability .ASYNC ;
30663066 if (stats .getMaxSeqNo () == stats .getGlobalCheckpoint () || asyncDurability ) {
30673067 final var trackedGlobalCheckpointsNeedSync = replicationTracker .trackedGlobalCheckpointsNeedSync ();
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Index getIndex() {
4040 }
4141
4242 long maxSeqNo () {
43- return shard .getEngine () .getSeqNoStats (-1 ).getMaxSeqNo ();
43+ return shard .withEngine ( engine -> engine .getSeqNoStats (-1 ) ).getMaxSeqNo ();
4444 }
4545
4646 long maxUnsafeAutoIdTimestamp () {
You can’t perform that action at this time.
0 commit comments