Murtadha Hubail has posted comments on this change. Change subject: ASTERIXDB-1425 & ASTERIXDB-1450: Fix LogReader random reads ......................................................................
Patch Set 5: (3 comments) https://asterix-gerrit.ics.uci.edu/#/c/867/5/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java: Line 563: untouchLogFile(logFileRef.getLogFileId()); > Why the split between close and untouch? I moved the close to the logManager. However, I'm passing the file channel from the TxnLogFile because I don't want to provide public access to it. Line 583: } > Is it the case that if the readercount is 0, we don't close the channel unt I'm not sure I understand what you meant by this, but a channel is closed per closeLogFile(.) call since each reader has its own channel. However, the log file is not deleted until the readerCount is 0. https://asterix-gerrit.ics.uci.edu/#/c/867/5/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogReader.java File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogReader.java: Line 271: continue; > Didn't it use to be that truncated would do what LARGE_RECORD does now? How No, this used to throw an exception in the truncated case. A truncated log could either be too big or we ran out of bytes to read. However, the log header information is guaranteed to fit in the regular size buffer. After reading the header information, based on the log size, we decide whether it is too big (LARGE_RECORD) or we just ran out of bytes to read and need to refill the buffer. -- To view, visit https://asterix-gerrit.ics.uci.edu/867 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1c75ca4a7c8fe197451126392389d4baecbd7e45 Gerrit-PatchSet: 5 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Young-Seok Kim <[email protected]> Gerrit-HasComments: Yes
