jihoonson commented on a change in pull request #8236: Add TaskResourceCleaner; 
fix a couple of concurrency bugs in batch tasks
URL: https://github.com/apache/incubator-druid/pull/8236#discussion_r311215586
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java
 ##########
 @@ -146,10 +146,13 @@
   private final RetryPolicyFactory retryPolicyFactory;
 
   @JsonIgnore
-  private List<IndexTask> indexTaskSpecs;
+  private final AppenderatorsManager appenderatorsManager;
 
   @JsonIgnore
-  private AppenderatorsManager appenderatorsManager;
+  private List<IndexTask> indexTaskSpecs;
+
+  @Nullable
+  private volatile IndexTask currentRunningTaskSpec = null;
 
 Review comment:
   > The added Javadoc doesn't answer the question "Why the semantics of 
volatile field reads and writes (as defined in the Java Memory Model) are 
required for the field?" from the referenced checklist item.
   
   I don't understand your comment. Do you want me to use the terms defined in 
the JMM?
   
   > It's actually likely that just adding volatile to the field is either not 
enough to achieve certain concurrency goal (which is also not clarified in the 
Javadoc), or not needed.
   
   I don't think this kind of comment helps. So do you think volatile here is 
necessary or not?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to