bitflicker64 commented on issue #3002:
URL: https://github.com/apache/hugegraph/issues/3002#issuecomment-4275384267

   > [@bitflicker64](https://github.com/bitflicker64) I can confirm this bug. 
Looking at the `IndexAPI` class, the `index()` method populates `leader`, 
`state`, `storeSize`, `graphSize`, and `partitionSize` on the `BriefStatistics` 
object but never sets `memberSize` 
[[1]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/IndexAPI.java#L66-L72).
   > 
   > Meanwhile, the `cluster()` method correctly does `statistics.memberSize = 
pdList.size()` 
[[2]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/IndexAPI.java#L110).
   > 
   > One nuance worth noting: `index()` uses `BriefStatistics` 
[[3]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/IndexAPI.java#L157-L165)
 while `cluster()` uses a separate `Statistics` class 
[[4]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/IndexAPI.java#L222-L281).
 The `BriefStatistics` class itself may not even have the `memberSize` field, 
so the fix would likely involve both adding the field to `BriefStatistics` and 
setting it in `index()` — not just adding the assignment line.
   > 
   > _To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph)._
   > 
   > Docs are dead. Just use 
[Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fhugegraph).
   > 
   > [![Leave 
Feedback](https://camo.githubusercontent.com/36dab98b8d4c28691f39c02dac135dc55eafb15d1194cd4c3280d181fde2f178/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c65617665253230466565646261636b2d3535353535353f7374796c653d666c6174)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fhugegraph#message_id=aeeb5202-d805-4148-a1d9-45e62315d11f)
 [![Ask Dosu about 
hugegraph](https://camo.githubusercontent.com/1affedde9207072a6e5db7922362ca5c9467bc5e339338e1a4f24db6a704a6b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41736b253230446f737525323061626f75742532306875676567726170682d3266376233663f7374796c653d666c6174266c6f676f3d64617461253341696d616765253246737667253242786d6c25334262617365363425324350484e325a79423361575230614430694f4459694947686c6157646f644430694f446b6949485a705a58644362336739496a41674d4341344e6941344f5349675a6d6c7362443069
 
626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a3438634746306143426b50534a4e4e5334794f54497a4e6941784d6934334f544934544445334c6a63314f544d674e6934324f4445344f4659334d6934314e6a5933544455754d6a6b794d7a59674f4451754d4459784f4659784d6934334f544934576949675a6d6c736244306949304930516b49354d534976506a78775958526f49475139496b30784f4334794e5463314944637a4c6a45784f545a4d4e546b754d544d794f5341334d6934334e44684d4e5445754e7a41784d5341344d6934304d446b31544449354c6a417a4d7a67674f4459754d6a6b78544459754d6a4d354e6a49674f4455754d5455314e4577784f4334794e5463314944637a4c6a45784f545a614969426d615778735053496a4e7a63344e54597849693825324250484268644767675a443069545445334c6a51354d5459674d7934334d7a597a4d30777a4c6a55344e545533494445794c6a63774f546c574f444d754e5463354d6b4d7a4c6a55344e545533494467304c6a63314e4449674e4334354f4455324d7941344e53347a4e6a5579494455754f4451334d4455674f4451754e545932544445354c6a59794f5459674e7a45754e7a67774d534967633352796
 
232746c50534a696247466a61794967633352796232746c4c5864705a48526f505349324c6a51794f4451304969427a64484a766132557462476c755a574e6863443069636d3931626d51694c7a34386257467a617942705a4430695a47397a6453316b4c574e3164473931644349675a6d6c73624430696432687064475569506a78775958526f49475a7062477774636e56735a5430695a585a6c626d396b5a43496759327870634331796457786c50534a6c646d56756232526b4969426b50534a4e4e4441754e7a4130494441754e5445344d445932534445334c6a41304d7a6c574e7a59754d6a49794d5567304d4334334d4452494e4449754e5467774e5567304e7934344d44457a517a59344c6a63774e6a51674e7a59754d6a49794d5341344e5334324e544d7a494455354c6a49334e5449674f4455754e6a557a4d79417a4f43347a4e7a4178517a67314c6a59314d7a4d674d5463754e445931494459344c6a63774e6a4d674d4334314d5467774e6a59674e4463754f4441784d7941774c6a55784f4441324e6b67304d6934314f444131534451774c6a63774e466f694c7a34384c32316863327325324250484268644767675a6d6c73624331796457786c50534a6c646d56756232526b4969426a62476c774c584a3162475539496d56325a5735765a4751694947513949
 
6b30304d4334334d4451674d4334314d5467774e6a5a494d5463754d44517a4f5659334e6934794d6a4978534451774c6a63774e4567304d6934314f444131534451334c6a67774d544e444e6a67754e7a41324e4341334e6934794d6a4978494467314c6a59314d7a4d674e546b754d6a63314d6941344e5334324e544d7a49444d344c6a4d334d4446444f4455754e6a557a4d7941784e7934304e6a55674e6a67754e7a41324d7941774c6a55784f4441324e6941304e7934344d44457a494441754e5445344d445932534451794c6a55344d4456494e4441754e7a4130576949675a6d6c73624430694930597a526a5a474d534976506a78775958526f49475139496b30784e7934774e444d35494441754e5445344d445932566930324c6a55334f54453553446b754f5451324e6a6c574d4334314d5467774e6a5a494d5463754d44517a4f56704e4d5463754d44517a4f5341334e6934794d6a497853446b754f5451324e6a6c574f444d754d7a45354e4567784e7934774e444d35566a63324c6a49794d6a4661545445334c6a41304d7a6b674e7934324d54557a4d6b67304d4334334d4452574c5459754e5463354d546c494d5463754d44517a4f5659334c6a59784e544d79576b30794e4334784e444579494463324c6a49794d6a46574d4334314d5467774e6a5a494f53343
 
54e4459324f5659334e6934794d6a4978534449304c6a45304d544a61545451774c6a63774e4341324f5334784d6a5135534445334c6a41304d7a6c574f444d754d7a45354e4567304d4334334d4452574e6a6b754d5449304f56704e4e4449754e5467774e5341324f5334784d6a5135534451774c6a63774e4659344d79347a4d546b30534451794c6a55344d4456574e6a6b754d5449304f56704e4e4463754f4441784d7941324f5334784d6a5135534451794c6a55344d4456574f444d754d7a45354e4567304e7934344d44457a566a59354c6a45794e446c61545463344c6a55314e69417a4f43347a4e7a4178517a63344c6a55314e6941314e53347a4e545531494459304c6a63344e6a63674e6a6b754d5449304f5341304e7934344d44457a494459354c6a45794e446c574f444d754d7a45354e454d334d6934324d6a59784944677a4c6a4d784f5451674f5449754e7a55774e5341324d7934784f54513549446b794c6a63314d4455674d7a67754d7a63774d5567334f4334314e545a61545451334c6a67774d544d674e7934324d54557a4d6b4d324e4334334f445932494463754e6a45314d7a49674e7a67754e545532494449784c6a4d344e4463674e7a67754e54553249444d344c6a4d334d4446494f5449754e7a55774e554d354d6934334e5441314944457a4c6a
 
55304e544d674e7a49754e6a4932494330324c6a55334f544535494451334c6a67774d544d674c5459754e5463354d546c574e7934324d54557a4d6c704e4e4449754e5467774e5341334c6a59784e544d79534451334c6a67774d544e574c5459754e5463354d546c494e4449754e5467774e5659334c6a59784e544d79576b30304d4334334d4451674e7934324d54557a4d6b67304d6934314f444131566930324c6a55334f544535534451774c6a63774e4659334c6a59784e544d79576949675a6d6c7362443069596d7868593273694947316863327339496e56796243676a5a47397a6453316b4c574e316447393164436b694c7a3438634746306143426b50534a4e4e6a67754f5449784e53417a4e6934774d544d31517a59344c6a6b794d5455674d7a59754d44457a4e5341324e5334334d7a5935494451354c6a51334d7a67674e5445754e44497a4d5341304f5334304e7a4d34517a4d334c6a45774f544d674e446b754e44637a4f43417a4d6934314e7a673349444d334c6a4d314f5459674d7a49754e5463344e79417a4e6934774d544d314969427a64484a7661325539496d4a7359574e724969427a64484a766132557464326c6b64476739496a63754e6a6b784e6a456949484e30636d39725a5331736157356c5932467750534a79623356755a434967633352796
 
232746c4c577870626d567162326c7550534a79623356755a434976506a78775958526f49475139496b30774c6a4d304f44597a4d7941344e5334304f545132517a41754d7a51344e6a4d7a494467314c6a51354e4459674d6a6b754e4467314e6941344e5334344d7a413549444d304c6a67774f5341344e5334324f5468444e4451754f444d7a4e7941344e5334304e446333494455784c6a49344e7a49674f4451754e444179494455334c6a55794e6a6b674e7a67754f5463794e454d324d6934344d544935494463304c6a4d334d6a63674e7a55754d544d304d6941314f5334324f444d32494463314c6a457a4e4449674e546b754e6a677a4e694967633352796232746c50534a696247466a61794967633352796232746c4c5864705a48526f505349324c6a45324e4467794969382532425043397a646d63253242)](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fhugegraph)
 [![Share Dosu with your 
team](https://camo.githubusercontent.com/75e6a5670cb470de110632344578950590e98c31e05e4b76b7c0a8caca2f1be5/68747470733a2f2f696d672e736869656c647
 
32e696f2f62616467652f5368617265253230446f737525323077697468253230796f75722532307465616d2d3166366665623f7374796c653d666c6174)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fhugegraph)
   
   Thanks for confirming. One correction though , BriefStatistics already has 
the memberSize field defined, it just never gets assigned in index(). So the 
fix is purely adding the assignment line:
   javastatistics.memberSize = RaftEngine.getInstance().getMembers().size();
   No changes needed to the BriefStatistics class itself.


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

Reply via email to