bitflicker64 commented on PR #3419: URL: https://github.com/apache/hugegraph/pull/3419#issuecomment-6462223311
## Review summary (head `cdce746`) **Score: 10/10.** No defect introduced by this PR was confirmed. Coverage: 2 of 4 independent whole-PR reviews received; 2 pending. This comment will be updated if a later review adds verified evidence. All four changed files were covered (`PartitionEngine.java`, `PartitionEngineMembershipTest.java`, `hg-store-test/pom.xml`, `docs/operations-guide.md`), diffed against merge-base `9a8f066`. What was checked in `PartitionEngine.changePeers`: - Fresh add: `pendingPromotions` equals `addPeers` when no target learner exists yet, so behavior matches the base. - Retry after catch-up timeout: target learners that already exist are waited on and promoted without recreating their raft nodes. In the base, this retry returned OK and left them as learners. Covered by `testCatchupTimeoutResumesWithoutRecreatingLearners` and `testResumesExistingLearnersWithoutRecreatingNodes`. - Voters already match but stale learners remain: the base returned OK and kept them. The head no longer returns early, so the existing removal path removes and destroys them (`testRemovesStaleLearnerEvenWhenVotersAlreadyMatch`). - `removeLearners` now receives only the peers being promoted, not every learner in the conf. After a partial promotion (learners removed, then `changePeers` failed), the retry re-adds those peers through the add path, which recreates their raft nodes (`testRetriesAfterLearnersWereRemovedButPromotionFailed`). - The `log.error` calls now print the status that actually failed. The base printed the earlier, successful status. Unchanged from base (not scored): if `removeLearners` succeeds and the follow-up `changePeers` fails, the method returns `TASK_ERROR`. `doChangeShard` re-enqueues only on `TASK_CONTINUE`, so recovery waits for PD to issue a new task, as it did before. Accepted trade-off of the fix (documented, not scored): each retry now waits up to 600s again and returns `TASK_CONTINUE`. A learner that never catches up keeps re-enqueuing the sync task with no overall deadline. The operations guide now describes this. Limits: the new tests mock the JRaft `Node`, override `waitForReplicate` and call `changePeers` directly. Neither the `doChangeShard` retry loop nor a real multi-node failure and recovery was exercised. Reviewers verified by reading source at the pinned base and head and the JRaft 1.3.14 sources; they did not run a local Maven build. PR CI: 10 checks passed, 7 skipped. -- 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]
