imbajin commented on code in PR #2130:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2130#discussion_r1127713314


##########
hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java:
##########
@@ -234,7 +240,7 @@ public boolean updateIfNodePresent(RoleTypeData stateData) {
                     if (Objects.equals(value.node(), copy.node()) &&

Review Comment:
   if the value could be `null` here?



##########
hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java:
##########
@@ -49,7 +53,11 @@ public void apply(StateMachineCallback stateMachineCallback) 
{
         while (!this.shutdown) {
             E.checkArgumentNotNull(this.state, "State don't be null");
             try {
+                RoleState pre = this.state;
                 this.state = state.transform(context);

Review Comment:
   Note: `state.transform` is not an atomic operation



-- 
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: dev-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to