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

Stefan Miklosovic edited comment on CASSANDRA-18572 at 8/25/23 8:35 AM:
------------------------------------------------------------------------

[~jonmeredith] I want to raise awareness that this is the thing we should also 
ship from 3.11 to trunk. Up to now there was quite a hack in place for cases 
when nodetool in in-jvm dtests was called as JMX was not present so it was 
calling these MBeans / services directly and it was throwing exceptions on a 
bunch of methods which in turn made testing impractical. Since JMX feature is 
available, we do not suffer from this problem anymore and we may hook nodetool 
to JMX of an instance directly as it should be in the first place. However, we 
need to keep the current solution in place as well (albeit simplified and 
refactored) for all cases when in-jvm dtests call nodetool and use JMX but they 
do not have JMX feature enabled. 

We might further clean it up and go with a proper JMX solution only but we 
would have to probably turn JMX feature on by default on all existing in-jvm 
dtests which is probably not a viable option.


was (Author: smiklosovic):
[~jonmeredith] I want to raise awareness that this is the thing we should also 
ship from 3.11 to trunk. Up to now there was quite a hack in place for cases 
when nodetool in in-jvm dtests was called as JMX was not present so it was 
calling these MBeans / services directly and it was throwing exceptions on a 
bunch of methods which in turn made testing impractical. Since JMX feature is 
available, we do not suffer from this problem anymore and we may hook nodetool 
to JMX of an instance directly as it should be in the the first place. However, 
we need to keep the current solution in place as well (albeit simplified and 
refactored) for all cases when in-jvm dtests call nodetool and use JMX but they 
do not have JMX feature enabled. 

We might further clean it up and go with a proper JMX solution only but we 
would have to probably turn on JMX feature on by default on all existing in-jvm 
dtests which is probably not viable option.

> Instance.nodetoolResult should connect to JMX if there is such feature 
> enabled in its config
> --------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18572
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18572
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Test/dtest/java
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 3.11.x, 4.0.x, 4.1.x, 5.x
>
>         Attachments: fix-jmx-issue-on-shutdown.patch
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Instance.nodetoolResult is not using JMX internally but it throws 
> UnsupportedOperationException in InternalNodeProbe for some nodetool comamnds.
> This makes calls to instance.nodetoolResult("info"), for example, impossible, 
> because these commands are using JMX / calling methods which are throwing 
> exception and it makes the testing painful.
> There is no reason to not support this if Instance has JMX feature as it was 
> added recently.



--
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