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

Brandon Williams commented on CASSANDRA-18709:
----------------------------------------------

This is probably a timeout, since this test [absolutely relies on 
timing|https://github.com/apache/cassandra-dtest/blame/trunk/jmx_test.py#L201], 
but we can improve the error a bit:

{noformat}
===Flaky Test Report===

test_compactionstats failed and was not selected for rerun.
        <class 'Exception'>
        Compaction({taskUuid}, {progress} / {total} bytes)@{uuid}(keyspace1, 
standard1) did not match Major compaction(633887a0-2fd6-11ee-b69d-fd97692b5e82, 
0 / 426 bytes)@7ad54392-bcdd-35a6-8417-4e047860b377(system, local)
        [<TracebackEntry /home/drift/cassandra-dtest/jmx_test.py:220>]

===End Flaky Test Report===
{noformat}

||Branch||CI||
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-18709-trunk]|[dtest 
repeat|https://app.circleci.com/pipelines/github/driftx/cassandra/1155/workflows/96cb8a44-1394-42ce-a1c9-2bf70bd14af0/jobs/39962]

> 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: 5.x
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to