Skip to content

Commit 326fa1c

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 95cdf12 commit 326fa1c

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
@@ -4342,7 +4342,7 @@ public void testConcurrentAppendUpdateAndRefresh() throws InterruptedException,
43424342
public void testAcquireIndexCommit() throws Exception {
43434343
IOUtils.close(engine, store);
43444344
store = createStore();
4345-
final AtomicLong globalCheckpoint = new AtomicLong();
4345+
final AtomicLong globalCheckpoint = new AtomicLong(SequenceNumbers.UNASSIGNED_SEQ_NO);
43464346
try (InternalEngine engine = createEngine(store, createTempDir(), globalCheckpoint::get)) {
43474347
int numDocs = between(1, 20);
43484348
for (int i = 0; i < numDocs; i++) {

0 commit comments

Comments
 (0)