asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (Code Review)" <>
Subject Change in asterixdb[master]: [ASTERIXDB-2230][TX] Survive Interrupt in Log File Switch
Date Fri, 19 Jan 2018 15:51:15 GMT
Murtadha Hubail has posted comments on this change.

Change subject: [ASTERIXDB-2230][TX] Survive Interrupt in Log File Switch

Patch Set 1:


The test failure happened because the test isn't going through the main code path and calling
a private method. In the new behavior the current file channel is closed inside prepareNextLogFile,
 and after that the test attempts to write using a page that is still referencing the old
file that was just closed. I fixed the test by calling ensureLastPageFlushed to make sure
the last page accessing the old file is flashed before switching to the new file.
File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/

PS1, Line 163: ClosedByInterruptException
> should we handle both InterruptedException & ClosedByInterruptException her

PS1, Line 188: IOException
> if you extend per comment on line 163, += InterruptedException here
File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/

PS1, Line 247:                 // move appendLSN and flushLSN to the first LSN of the next
log file
             :                 // only after the file was created and the channel was positioned
             :                 appendLSN.set(nextFileBeginLsn);
             :                 flushLSN.set(nextFileBeginLsn);
             :       "Created new txn log file with id({}) starting
with LSN = {}",
             :                         getLogFileId(nextFileBeginLsn), nextFileBeginLsn);
> I guess these are not io interruptible and could be confusing to have here,
Actually only setting the channel position is interruptible. I put them together just to indicate
that these operations should succeed together. I removed them for now until one of us has
a strong opinion.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I191564c510c0555f191a35e2603e051bbef24540
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <>
Gerrit-Reviewer: Michael Blow <>
Gerrit-Reviewer: Murtadha Hubail <>
Gerrit-HasComments: Yes

View raw message