comnetwork commented on a change in pull request #2055:
URL: https://github.com/apache/hbase/pull/2055#discussion_r454418458



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java
##########
@@ -59,7 +59,7 @@
 
   private final Class<? extends Channel> channelClass;
 
-  private AsyncFSOutput output;
+  private volatile AsyncFSOutput output;

Review comment:
       The `output` would be set to null in `AsyncProtobufLogWriter.close` and 
would be used in `getSyncedLength` method, and seems there is no explicit 
constraint on which thread could invoke `AsyncProtobufLogWriter.close` , so 
here use `volatile`




----------------------------------------------------------------
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:
[email protected]


Reply via email to