mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 05:15:04 +00:00
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
This commit is contained in:
parent
095f31b80e
commit
82722ebad3
@ -4324,7 +4324,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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user