Commit 7afce9d
fix(pd): populate memberSize in GET / endpoint response (#3003)
* fix(pd): complete GET / stats fix and add test coverage
- Use pdService.getMembers() for memberSize (consistent with cluster())
instead of RaftEngine directly, as suggested in issue #3002 discussion
- Add dataState field to BriefStatistics: exposes worst partition health
state across all graphs, the most useful missing operational indicator
- Align graphSize to count only user-facing graphs (endsWith("/g")),
matching the semantics of cluster() to avoid silent count discrepancy
- Add testQueryIndexInfo() to both RestApiTest classes to assert state,
leader, memberSize > 0, and storeSize > 0 — catches this class of bug
* fix(pd): relax storeSize assertion in PD-only test environment
---------
Co-authored-by: imbajin <jin@apache.org>1 parent a8ae76b commit 7afce9d
3 files changed
Lines changed: 68 additions & 1 deletion
File tree
- hugegraph-pd
- hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest
- hg-pd-test/src/main/java/org/apache/hugegraph/pd
- rest
- service
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
71 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
72 | 98 | | |
73 | 99 | | |
74 | 100 | | |
| |||
157 | 183 | | |
158 | 184 | | |
159 | 185 | | |
| 186 | + | |
| 187 | + | |
160 | 188 | | |
161 | 189 | | |
| 190 | + | |
162 | 191 | | |
| 192 | + | |
163 | 193 | | |
164 | 194 | | |
165 | 195 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
| |||
0 commit comments