mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 14:54:56 +00:00
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
This commit is contained in:
parent
51c6aefa55
commit
a88d54eb2d
@ -4891,8 +4891,8 @@ public class InternalEngineTests extends EngineTestCase {
|
||||
engine.syncTranslog();
|
||||
}
|
||||
if (frequently()) {
|
||||
final long lastSyncedGlobalCheckpoint = Translog.readGlobalCheckpoint(translogPath, translogUUID);
|
||||
engine.flush(randomBoolean(), true);
|
||||
final long lastSyncedGlobalCheckpoint = Translog.readGlobalCheckpoint(translogPath, translogUUID);
|
||||
final List<IndexCommit> commits = DirectoryReader.listCommits(store.directory());
|
||||
// Keep only one safe commit as the oldest commit.
|
||||
final IndexCommit safeCommit = commits.get(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user