This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new 8d45a2c6 Wait for compaction manager more intelligently
8d45a2c6 is described below
commit 8d45a2c6c9da7f6b66c128c43b5547c2797ba10b
Author: Brandon Williams <[email protected]>
AuthorDate: Thu Aug 3 12:14:24 2023 -0500
Wait for compaction manager more intelligently
Patch by brandonwilliams; reviewed by edimitrova for CASSANDRA-18709
---
jmx_test.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/jmx_test.py b/jmx_test.py
index 02135686..87e9adf3 100644
--- a/jmx_test.py
+++ b/jmx_test.py
@@ -200,11 +200,14 @@ class TestJMX(Tester):
node.nodetool_process('compact keyspace1')
# We need to sleep here to give compaction time to start
node.watch_log_for("Compacting")
- time.sleep(2)
compaction_manager = make_mbean('db', type='CompactionManager')
with JolokiaAgent(node) as jmx:
- progress_string = jmx.read_attribute(compaction_manager,
'CompactionSummary')[0]
+ summary = jmx.read_attribute(compaction_manager,
'CompactionSummary')
+ while (len(summary) < 1):
+ summary = jmx.read_attribute(compaction_manager,
'CompactionSummary')
+ time.sleep(1)
+ progress_string = summary[0]
# Pause in between reads
# to allow compaction to move forward
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]