Fix testPostOperationGlobalCheckpointSync
The conditions in this test do not hold true anymore after #43205. Relates to #43205
This commit is contained in:
parent
e4738587c0
commit
3d5e4577aa
|
@ -44,6 +44,7 @@ import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.BrokenBarrierException;
|
import java.util.concurrent.BrokenBarrierException;
|
||||||
import java.util.concurrent.CyclicBarrier;
|
import java.util.concurrent.CyclicBarrier;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
@ -83,8 +84,14 @@ public class GlobalCheckpointSyncIT extends ESIntegTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPostOperationGlobalCheckpointSync() throws Exception {
|
public void testPostOperationGlobalCheckpointSync() throws Exception {
|
||||||
// set the sync interval high so it does not execute during this test
|
// set the sync interval high so it does not execute during this test. This only allows the the global checkpoint to catch up
|
||||||
runGlobalCheckpointSyncTest(TimeValue.timeValueHours(24), client -> {}, client -> {});
|
// on a post-operation background sync if translog durability is set to sync. Async durability relies on a scheduled global
|
||||||
|
// checkpoint sync to allow the information about persisted local checkpoints to be transferred to the primary.
|
||||||
|
runGlobalCheckpointSyncTest(TimeValue.timeValueHours(24),
|
||||||
|
client ->
|
||||||
|
client.admin().indices().prepareUpdateSettings("test").setSettings(Settings.builder()
|
||||||
|
.put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), Translog.Durability.REQUEST)).get(),
|
||||||
|
client -> {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -212,7 +219,7 @@ public class GlobalCheckpointSyncIT extends ESIntegTestCase {
|
||||||
assertThat(seqNoStats.getGlobalCheckpoint(), equalTo(primarySeqNoStats.getGlobalCheckpoint()));
|
assertThat(seqNoStats.getGlobalCheckpoint(), equalTo(primarySeqNoStats.getGlobalCheckpoint()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, 30, TimeUnit.SECONDS);
|
||||||
|
|
||||||
for (final Thread thread : threads) {
|
for (final Thread thread : threads) {
|
||||||
thread.join();
|
thread.join();
|
||||||
|
|
Loading…
Reference in New Issue