Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Brooks committed Aug 13, 2024
1 parent 7be3787 commit 87f4297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public void run() {

executorService.execute(r);


BulkResponse bulkResponse = future.actionGet();
assertNoFailures(bulkResponse);

Expand Down Expand Up @@ -155,7 +154,6 @@ public void run() {

executorService.execute(r);


BulkResponse bulkResponse = future.actionGet();
assertNoFailures(bulkResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
Expand Down Expand Up @@ -1797,7 +1796,8 @@ public void run() {
handler.lastItems(docs, () -> {}, future);
} else {
handler.addItems(docs, () -> {}, () -> {
if (runs.incrementAndGet() % 100 == 0) {
// Every 10 runs dispatch to new thread to prevent stackoverflow
if (runs.incrementAndGet() % 10 == 0) {
new Thread(this).start();
} else {
this.run();
Expand Down

0 comments on commit 87f4297

Please sign in to comment.