[ 
https://issues.apache.org/jira/browse/CASSANDRA-18709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757076#comment-17757076
 ] 

Stefan Miklosovic edited comment on CASSANDRA-18709 at 8/21/23 7:55 PM:
------------------------------------------------------------------------

For completeness, we started to do this slightly different here 

https://github.com/apache/cassandra-dtest/commit/94142323a


was (Author: smiklosovic):
For completeness, the started to do this slightly different here 

https://github.com/apache/cassandra-dtest/commit/94142323a

> Test failure: dtest.jmx_test.TestJMX.test_compactionstats
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-18709
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18709
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest/python
>            Reporter: Ekaterina Dimitrova
>            Assignee: Brandon Williams
>            Priority: Normal
>             Fix For: 3.0.30, 3.11.16, 4.0.12, 4.1.4, 5.0
>
>
> Seen here:
> [https://ci-cassandra.apache.org/job/Cassandra-trunk/1646/testReport/dtest.jmx_test/TestJMX/test_compactionstats/]
> h3.  
> {code:java}
> Error Message
> AttributeError: 'NoneType' object has no attribute 'named'
> Stacktrace
> self = <jmx_test.TestJMX object at 0x7fe78cfc2940> def 
> test_compactionstats(self): """ @jira_ticket CASSANDRA-10504 @jira_ticket 
> CASSANDRA-10427 Test that jmx MBean used by nodetool compactionstats properly 
> updates the progress of a compaction """ cluster = self.cluster 
> cluster.populate(1) node = cluster.nodelist()[0] cluster.start() # Run a 
> quick stress command to create the keyspace and table node.stress(['write', 
> 'n=1', 'no-warmup']) # Disable compaction on the table 
> node.nodetool('disableautocompaction keyspace1 standard1') 
> node.nodetool('setcompactionthroughput 1') node.stress(['write', 'n=150K', 
> 'no-warmup']) node.flush() # Run a major compaction. This will be the 
> compaction whose # progress we track. node.nodetool_process('compact') # We 
> need to sleep here to give compaction time to start # Why not do something 
> smarter? Because if the bug regresses, # we can't rely on jmx to tell us that 
> compaction started. time.sleep(5) compaction_manager = make_mbean('db', 
> type='CompactionManager') with JolokiaAgent(node) as jmx: progress_string = 
> jmx.read_attribute(compaction_manager, 'CompactionSummary')[0] # Pause in 
> between reads # to allow compaction to move forward time.sleep(2) 
> updated_progress_string = jmx.read_attribute(compaction_manager, 
> 'CompactionSummary')[0] var = 'Compaction@{uuid}(keyspace1, standard1, 
> {progress}/{total})bytes' if self.cluster.version() >= LooseVersion('4.0'): # 
> CASSANDRA-15954 var = 'Compaction({taskUuid}, {progress} / {total} 
> bytes)@{uuid}(keyspace1, standard1)' > progress = int(parse.search(var, 
> progress_string).named['progress']) E AttributeError: 'NoneType' object has 
> no attribute 'named' jmx_test.py:218: AttributeError
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to