arjunashok commented on code in PR #144:
URL: https://github.com/apache/cassandra-sidecar/pull/144#discussion_r1907604763
##########
adapters/base/src/main/java/org/apache/cassandra/sidecar/adapters/base/CassandraStorageOperations.java:
##########
@@ -213,4 +214,38 @@ public void outOfRangeDataCleanup(@NotNull String
keyspace, @NotNull String tabl
jmxClient.proxy(StorageJmxOperations.class, STORAGE_SERVICE_OBJ_NAME)
.forceKeyspaceCleanup(concurrency, keyspace, table);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isDecommissioning()
+ {
+ StorageJmxOperations ssProxy =
jmxClient.proxy(StorageJmxOperations.class, STORAGE_SERVICE_OBJ_NAME);
+ String nodeOperationMode = ssProxy.getOperationMode();
+ // The following check is equivalent to the operation-mode checks
within Cassandra to determine if a
+ // decommission operation is in progress
+ return nodeOperationMode.equals("LEAVING") ||
nodeOperationMode.equals("DECOMMISSION_FAILED");
Review Comment:
Looks like this was changed in Cassandra recently, will update.
https://github.com/apache/cassandra/commit/c679b4730332ef67102ec7e47db891be2f8feabf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]