[ https://issues.apache.org/jira/browse/CASSANDRA-19902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009557#comment-18009557 ]
Stefan Miklosovic commented on CASSANDRA-19902: ----------------------------------------------- What I am not completely sure about is what happens when somebody calls operationMode() while ClusterMetadata.current().myNodeState() would return null. Then null would be fed to that switch .... So in that sense "if (!isInitialized())" serves as "insurance" that by the time myNodeState() is called in that method, initServer() finished so it returns something meaningful. > StorageService JMX mbean is not available during bootstrap > ---------------------------------------------------------- > > Key: CASSANDRA-19902 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19902 > Project: Apache Cassandra > Issue Type: Bug > Components: Tool/nodetool > Reporter: Paulo Motta > Assignee: Paulo Motta > Priority: Normal > Fix For: 5.0.x, 5.x > > Time Spent: 1h 50m > Remaining Estimate: 0h > > Looks like the seemingly harmless cosmetic patch from CASSANDRA-11537 causes > the StorageServiceMBean to not be available during bootstrap. This causes > commands like "nodetool nestats/status/etc" to not be available on the > boostrapping node with the following error: > {code:none} > - StackTrace -- > javax.management.InstanceNotFoundException: > org.apache.cassandra.db:type=StorageService > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1083) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:637) > {code} > This ticket is just to revert CASSANDRA-11537, we can re-add the improvement > of that ticket later. -- 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