Skip to content

Commit 5f20e2e

Browse files
committed
Fix testKeepTranslogAfterGlobalCheckpoint
Read the last synced global checkpoint after flushing as we might advance it during committing. CI: https://gradle-enterprise.elastic.co/s/7o6qengg4gva2
1 parent c1aed6f commit 5f20e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4797,8 +4797,8 @@ protected void commitIndexWriter(IndexWriter writer, Translog translog, String s
47974797
engine.syncTranslog();
47984798
}
47994799
if (frequently()) {
4800-
final long lastSyncedGlobalCheckpoint = Translog.readGlobalCheckpoint(translogPath, translogUUID);
48014800
engine.flush(randomBoolean(), true);
4801+
final long lastSyncedGlobalCheckpoint = Translog.readGlobalCheckpoint(translogPath, translogUUID);
48024802
final List<IndexCommit> commits = DirectoryReader.listCommits(store.directory());
48034803
// Keep only one safe commit as the oldest commit.
48044804
final IndexCommit safeCommit = commits.get(0);

0 commit comments

Comments
 (0)