From b471c27f0c52732fde5218b54f3d91e2de3c0adb Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Mon, 13 May 2024 21:50:56 -0600 Subject: [PATCH] Changes --- .../org/elasticsearch/test/InternalTestCluster.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java index 121fd84957cb0..1c00aa7f2c07a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java @@ -1298,6 +1298,7 @@ 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); @@ -1305,10 +1306,12 @@ private void assertAllPendingWriteLimitsReleased() throws Exception { 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