imbajin commented on code in PR #3359:
URL: https://github.com/apache/hugegraph/pull/3359#discussion_r4348799087


##########
hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/service/PDRestService.java:
##########
@@ -154,11 +182,11 @@ public List<Metapb.PartitionStats> 
getPartitionStatus(String graphName) throws P
     }
 
     public Map<Integer, KVPair<Long, Long>> balancePartitions() throws 
PDException {
-        return monitorService.balancePartitionShard();
+        return runLeaderTask(() -> monitorService.balancePartitionShard());
     }
 
     public List<Metapb.Partition> splitPartitions() throws PDException {
-        return monitorService.autoSplitPartition();
+        return runLeaderTask(() -> monitorService.autoSplitPartition());

Review Comment:
   ⚠️ Important. Blocking: no. Summary: A successful split still reports an 
empty `partitions` list. Evidence: `autoSplitPartition()` schedules every 
current shard group with `splitShardGroups(list)` and then returns null at 
`TaskScheduleService.java:699-704`; `TaskAPI.splitPartitions()` serializes that 
as an empty list. Callers therefore cannot identify the work that was 
scheduled. Please return the affected group or partition IDs (or another 
explicit scheduled outcome) and document the response.



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