bharathv commented on a change in pull request #3332:
URL: https://github.com/apache/hbase/pull/3332#discussion_r642682623
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
##########
@@ -1190,9 +1201,18 @@ public OptionalLong getLogFileSizeIfBeingWritten(Path
path) {
try {
Path currentPath = getOldPath();
if (path.equals(currentPath)) {
+ // Currently active path.
W writer = this.writer;
return writer != null ? OptionalLong.of(writer.getSyncedLength()) :
OptionalLong.empty();
} else {
+ W temp = inflightWALClosures.get(path.getName());
+ if (temp != null) {
Review comment:
Not sure what you mean, we are returning a long from getSyncedLength()
under the same lock (we are not returning the reference temp), actual method
getSyncedLength() is thread-safe, if thats what you are asking..
Also, both shutdown() / rollWriter are under the scope of rollWriterLock.
--
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]