OneSizeFitsQuorum commented on code in PR #11609:
URL: https://github.com/apache/iotdb/pull/11609#discussion_r1404470511
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java:
##########
@@ -224,6 +224,24 @@ public DataNodeConfigurationResp getDataNodeConfiguration(
return result;
}
+ /** Return the number of registered Nodes. */
+ public int getRegisteredNodeCount() {
+ int result;
+ dataNodeInfoReadWriteLock.readLock().lock();
+ try {
+ result = registeredDataNodes.size();
+ } finally {
+ dataNodeInfoReadWriteLock.readLock().unlock();
+ }
+ configNodeInfoReadWriteLock.readLock().lock();
+ try {
+ result += registeredConfigNodes.size();
Review Comment:
do we need to add confignode size?
--
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]