Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Brooks committed May 14, 2024
1 parent bdf3366 commit b471c27
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1298,17 +1298,20 @@ public void beforeIndexDeletion() throws Exception {
}

private void assertAllPendingWriteLimitsReleased() throws Exception {
AtomicInteger spins = new AtomicInteger(0);
assertBusy(() -> {
for (NodeAndClient nodeAndClient : nodes.values()) {
IndexingPressure indexingPressure = getInstance(IndexingPressure.class, nodeAndClient.name);
final long combinedBytes = indexingPressure.stats().getCurrentCombinedCoordinatingAndPrimaryBytes();
final long coordinatingBytes = indexingPressure.stats().getCurrentCoordinatingBytes();
final long primaryBytes = indexingPressure.stats().getCurrentPrimaryBytes();
if (combinedBytes > 0) {
logger.error(
"Outstanding tasks: \n{}",
client().admin().cluster().prepareListTasks(nodeAndClient.name).setDetailed(true).get()
);
if (spins.getAndIncrement() % 10 == 0) {
logger.error(
"Outstanding tasks: \n{}",
client().admin().cluster().prepareListTasks().setDetailed(true).setActions("indices:data/*").get()
);
}
throw new AssertionError(
"pending combined bytes ["
+ combinedBytes
Expand Down

0 comments on commit b471c27

Please sign in to comment.