abdullah alamoudi has posted comments on this change. Change subject: [ASTERIXDB-2204][STO] Fix implementations and usages of IIndexCursor ......................................................................
Patch Set 16: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/2324/16/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java File asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java: PS16, Line 139: Throwable failure = null; : if (fileIndexSearchCursor != null) { : try { : fileIndexSearchCursor.close(); : } catch (Throwable th) { // NOSONAR Will be re-thrown : failure = th; : } : try { : fileIndexSearchCursor.destroy(); : } catch (Throwable th) {// NOSONAR Will be re-thrown : failure = ExceptionUtils.suppress(failure, th); : } : } : if (fileIndexAccessor != null) { : try { : fileIndexAccessor.destroy(); : } catch (Throwable th) {// NOSONAR Will be re-thrown : failure = ExceptionUtils.suppress(failure, th); : } : } : if (index != null) { : try { : indexDataflowHelper.close(); : } catch (Throwable th) {// NOSONAR Will be re-thrown : failure = ExceptionUtils.suppress(failure, th); : } : } : if (failure != null) { : throw HyracksDataException.create(failure); : } > this loses interrupts, and is dangerous wrt Errors. Can we add something t check this out: https://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.20.3.1 Even try with resources will catch Errors and still call the close on the next resources... and you will also lose interrupts if an InterruptedException was thrown. -- To view, visit https://asterix-gerrit.ics.uci.edu/2324 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I98a7a8b931eb24dbe11bf2bdc61b754ca28ebdf9 Gerrit-PatchSet: 16 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Luo Chen <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
