Skip to content

Commit 82722eb

Browse files
committed
TEST: init unassigned gcp in testAcquireIndexCommit
The global checkpoint should be assigned to unassigned rather than 0. If a single document is indexed and the global checkpoint is initialized with 0, the first commit is safe which the test does not suppose. Relates #28038
1 parent 095f31b commit 82722eb

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
@@ -4324,7 +4324,7 @@ public void testConcurrentAppendUpdateAndRefresh() throws InterruptedException,
43244324
public void testAcquireIndexCommit() throws Exception {
43254325
IOUtils.close(engine, store);
43264326
store = createStore();
4327-
final AtomicLong globalCheckpoint = new AtomicLong();
4327+
final AtomicLong globalCheckpoint = new AtomicLong(SequenceNumbers.UNASSIGNED_SEQ_NO);
43284328
try (InternalEngine engine = createEngine(store, createTempDir(), globalCheckpoint::get)) {
43294329
int numDocs = between(1, 20);
43304330
for (int i = 0; i < numDocs; i++) {

0 commit comments

Comments
 (0)