Bug Type (问题类型)
other exception / error (其他异常报错)
Before submit
Environment (环境信息)
- Server Version: 1.7.0 (latest Docker image)
- Backend: hstore 3 nodes
- OS: macOS (Apple M4), Docker Desktop
- Data Size: N/A — reproducible on fresh cluster
Expected & Actual behavior (期望与实际表现)
The memberSize field in the response from GET / (IndexAPI) always returns 0
regardless of how many PD nodes are actually in the cluster.
Actual:
curl -u store:store http://localhost:8620/
{"state":"Cluster_Not_Ready","leader":"pd2:8686","memberSize":0,"storeSize":3,...}
Expected:
memberSize should return 3 for a 3-node PD cluster.
Root cause:
IndexAPI.index() sets storeSize, graphSize, partitionSize, leader but never
sets memberSize on the BriefStatistics object. The field defaults to 0.
The /v1/cluster endpoint in the same file does it correctly:
statistics.memberSize = pdList.size();
Fix: add the equivalent line in index() using
RaftEngine.getInstance().getMembers().size()
Bug Type (问题类型)
other exception / error (其他异常报错)
Before submit
Environment (环境信息)
Expected & Actual behavior (期望与实际表现)
The
memberSizefield in the response fromGET /(IndexAPI) always returns 0regardless of how many PD nodes are actually in the cluster.
Actual:
curl -u store:store http://localhost:8620/
{"state":"Cluster_Not_Ready","leader":"pd2:8686","memberSize":0,"storeSize":3,...}
Expected:
memberSize should return 3 for a 3-node PD cluster.
Root cause:
IndexAPI.index() sets storeSize, graphSize, partitionSize, leader but never
sets memberSize on the BriefStatistics object. The field defaults to 0.
The /v1/cluster endpoint in the same file does it correctly:
statistics.memberSize = pdList.size();
Fix: add the equivalent line in index() using
RaftEngine.getInstance().getMembers().size()