dcapwell commented on code in PR #3664:
URL: https://github.com/apache/cassandra/pull/3664#discussion_r1837340813


##########
src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java:
##########
@@ -67,23 +66,24 @@
 @Simulate(with=MONITORS)
 public class AccordConfigurationService extends 
AbstractConfigurationService<AccordConfigurationService.EpochState, 
AccordConfigurationService.EpochHistory> implements ChangeListener, 
AccordEndpointMapper, AccordSyncPropagator.Listener, Shutdownable
 {
-    private static final Logger logger = 
LoggerFactory.getLogger(AccordConfigurationService.class);
-
     private final AccordSyncPropagator syncPropagator;
     private final DiskStateManager diskStateManager;
 
+    @GuardedBy("this")
     private EpochDiskState diskState = EpochDiskState.EMPTY;
 
     private enum State { INITIALIZED, LOADING, STARTED, SHUTDOWN }
 
+    @GuardedBy("this")
     private State state = State.INITIALIZED;
     private volatile EndpointMapping mapping = EndpointMapping.EMPTY;
 
     public enum SyncStatus { NOT_STARTED, NOTIFYING, COMPLETED }
 
     static class EpochState extends 
AbstractConfigurationService.AbstractEpochState
     {
-        SyncStatus syncStatus = SyncStatus.NOT_STARTED;
+        @GuardedBy("AccordConfigurationService.this")
+        private SyncStatus syncStatus = SyncStatus.NOT_STARTED;
         protected final AsyncResult.Settable<Void> localSyncNotified = 
AsyncResults.settable();

Review Comment:
   renamed the public api to `unsafeLocalSyncNotified` and added a javadoc 
saying why it is unsafe



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