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


##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/core/raft/PartitionStateMachineTest.java:
##########
@@ -155,4 +182,139 @@ private static Lock getInternalLock(PartitionStateMachine 
stateMachine) throws E
         field.setAccessible(true);
         return (Lock) field.get(stateMachine);
     }
+    @Test

Review Comment:
   Fixed in 181865d5d: added the missing separator before the test method. 
Formatting and full clean compile passed.



##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/raft/PartitionStateMachine.java:
##########
@@ -105,6 +105,9 @@ public void onApply(Iterator iter) {
                               done.getOperation().getOp(),
                               done.getOperation().getReq());
                 }
+                iter.setErrorAndRollback(1, new 
Status(RaftError.ESTATEMACHINE, t.getMessage()));

Review Comment:
   Fixed in 181865d5d. DefaultRaftClosure now isolates response exceptions, and 
handlers receive that guarded adapter, covering both handler-internal callbacks 
and the outer completion. PD uses the same protection. All three new 
callback-failure tests fail before the fix and pass afterward; real apply 
failures still stop the FSM.



##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/raft/PartitionStateMachine.java:
##########
@@ -105,6 +105,9 @@ public void onApply(Iterator iter) {
                               done.getOperation().getOp(),
                               done.getOperation().getReq());
                 }
+                iter.setErrorAndRollback(1, new 
Status(RaftError.ESTATEMACHINE, t.getMessage()));

Review Comment:
   Fixed in 181865d5d. State-machine errors synchronously latch a terminal flag 
before JRaft marks the node inactive; the common restart entry point blocks 
replay from error handling, activity checks and other callers. Other error 
types retain asynchronous recovery. Tests cover the guard and synchronous 
notification, and the operations guide documents repairing the cause before 
restarting the Store process. Independent review found the original 
asynchronous notification window; that window is now closed and re-reviewed.



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