Skip to content

Commit

Permalink
Revert "Adding subshard work items on lease expiry" (opensearch-proje…
Browse files Browse the repository at this point in the history
…ct#1183)

Signed-off-by: Mikayla Thompson <[email protected]>
  • Loading branch information
mikaylathompson authored Dec 6, 2024
1 parent d7681d2 commit b055711
Show file tree
Hide file tree
Showing 32 changed files with 383 additions and 1,219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ private List<CompletableFuture<?>> generateDocs(String indexName, Workload workl
log.atTrace().setMessage("Created doc for index {}: {}")
.addArgument(indexName)
.addArgument(doc::toString).log();
var docId = docIdCounter.incrementAndGet();
return new BulkDocSection(indexName + "_" + docId, indexName, null, doc.toString(), null);
return new BulkDocSection(indexName + "_" + docIdCounter.incrementAndGet(), indexName, null, doc.toString());
})
.collect(Collectors.toList());

Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.opensearch.migrations.bulkload;

import java.io.File;
import java.time.Duration;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -127,21 +126,18 @@ private void migrationDocumentsWithClusters(
final var clockJitter = new Random(1);

// ExpectedMigrationWorkTerminationException is thrown on completion.
var expectedTerminationException = Assertions.assertTimeout(
Duration.ofSeconds(30),
() -> Assertions.assertThrows(
ExpectedMigrationWorkTerminationException.class,
() -> migrateDocumentsSequentially(
sourceRepo,
snapshotName,
List.of(),
targetCluster.getUrl(),
runCounter,
clockJitter,
testDocMigrationContext,
sourceCluster.getContainerVersion().getVersion(),
false
)
var expectedTerminationException = Assertions.assertThrows(
ExpectedMigrationWorkTerminationException.class,
() -> migrateDocumentsSequentially(
sourceRepo,
snapshotName,
List.of(),
targetCluster.getUrl(),
runCounter,
clockJitter,
testDocMigrationContext,
sourceCluster.getContainerVersion().getVersion(),
false
)
);

Expand Down
Loading

0 comments on commit b055711

Please sign in to comment.