asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
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:

(3 comments)

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.

https://asterix-gerrit.ics.uci.edu/#/c/2301/1/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/InvokeUtil.java
File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/InvokeUtil.java:

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


PS1, Line 188: IOException
> if you extend per comment on line 163, += InterruptedException here
Done


https://asterix-gerrit.ics.uci.edu/#/c/2301/1/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:

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
successfully
             :                 appendLSN.set(nextFileBeginLsn);
             :                 flushLSN.set(nextFileBeginLsn);
             :                 LOGGER.info("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 https://asterix-gerrit.ics.uci.edu/2301
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I191564c510c0555f191a35e2603e051bbef24540
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <mhubail@apache.org>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Murtadha Hubail <mhubail@apache.org>
Gerrit-HasComments: Yes

Mime
View raw message