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
@@ -4342,7 +4342,7 @@ public class InternalEngineTests extends EngineTestCase {
public void testAcquireIndexCommit() throws Exception {
IOUtils.close(engine, store);
store = createStore();
- final AtomicLong globalCheckpoint = new AtomicLong();
+ final AtomicLong globalCheckpoint = new AtomicLong(SequenceNumbers.UNASSIGNED_SEQ_NO);
try (InternalEngine engine = createEngine(store, createTempDir(), globalCheckpoint::get)) {
int numDocs = between(1, 20);
for (int i = 0; i < numDocs; i++) {
