imbajin commented on PR #3356:
URL: https://github.com/apache/hugegraph/pull/3356#issuecomment-6192830258

   Review at f57f45da673a5450f17c1604c44eb8189a842b9d: 7/10 overall 
(independent reviewers: 7 and 6.5). The opt-in implementation is compact, but 
please address one P2 availability issue before merging.
   
   P2 — Skip automatic balancing when shard groups are known unhealthy. In 
TaskScheduleService.java:630–636, active-store membership is checked but 
group.getState() is ignored. Active entries survive for the configured 
keepAliveTimeout (300 seconds by default). During a normal Store outage, 
surviving partition heartbeats can already mark a three-replica group 
PState_Warn while the missing Store remains in that active set. A scheduled 
tick can therefore pass this guard and ask the existing global balancer to 
transfer leaders to that unavailable replica. The timer is not synchronized 
with Store failures, so its default 300-second interval does not prevent this 
window.
   
   This can affect writes, rather than merely produce a failed-transfer log: 
the pinned JRaft 1.3.14 transfer path can enter STATE_TRANSFERRING while 
waiting for the target and reject writes until the election timeout. The manual 
transfer behavior predates this PR; the new automatic trigger exposes it 
without an operator choosing the timing.
   
   A minimal bounded fix is to skip the automatic pass when any shard group is 
non-Normal, since balancePartitionLeader(false) plans globally. Add a 
regression with all Store IDs still active but one group Warn: expect zero 
transfers; after restoring Normal state, the same imbalance should trigger 
balancing. This guards known-unhealthy metadata without claiming complete 
replica-readiness detection or requiring an allocator rewrite.
   
   Evidence: source inspection and independent cross-review, not a live-cluster 
reproduction. The new three tests cover balanced, imbalanced and 
missing-active-store cases; upstream PD core tests passed during review, while 
the overall workflow was still running.


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