You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/09/26 13:59:59 UTC

[GitHub] [hudi] dugenkui03 commented on a change in pull request #2115: [MINOR] Mark started and shutdownRequested with volatile.

dugenkui03 commented on a change in pull request #2115:
URL: https://github.com/apache/hudi/pull/2115#discussion_r495459478



##########
File path: hudi-client/src/main/java/org/apache/hudi/async/AbstractAsyncService.java
##########
@@ -39,9 +39,9 @@
   private static final Logger LOG = LogManager.getLogger(AbstractAsyncService.class);
 
   // Flag to track if the service is started.
-  private boolean started;
+  private volatile boolean started;

Review comment:
       The purpose of this change is ensure the visibility of `started` and `shutdownRequested`.
   
   The getter method `isStarted()` provide a way to read the service status.




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

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