This is an automated email from the ASF dual-hosted git repository.
wyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 8aeaac5d8d [ASTERIXDB-3458][STO] Halt on page write failure
8aeaac5d8d is described below
commit 8aeaac5d8d3497e988d69f75ec96087de2c5c202
Author: Wail Alkowaileet <[email protected]>
AuthorDate: Mon Jul 15 09:48:55 2024 -0700
[ASTERIXDB-3458][STO] Halt on page write failure
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
On write failures, if an exception is thrown,
index bulk-loaders continue to write until
the bulk loader ends. Afterwards, the system
will halt. Instead, the bulkload operation
should halt immediately.
Ext-ref: MB-62715
Change-Id: I79a88922585123fb97239ee6c8be5984d2ab2c08
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18486
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
Tested-by: Jenkins <[email protected]>
---
.../storage/common/buffercache/FIFOLocalWriter.java | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git
a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/FIFOLocalWriter.java
b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/FIFOLocalWriter.java
index e07668602f..7d4e119bef 100644
---
a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/FIFOLocalWriter.java
+++
b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/FIFOLocalWriter.java
@@ -46,13 +46,10 @@ public class FIFOLocalWriter implements IFIFOPageWriter {
callback.beforeWrite(cPage);
bufferCache.write(cPage, context);
callback.afterWrite(cPage);
- } catch (Exception e) {
- handleWriteFailure(page, e);
- LOGGER.warn("Failed to write page {}", cPage, e);
} catch (Throwable th) {
// Halt
- LOGGER.error("FIFOLocalWriter has encountered a fatal error", th);
- ExitUtil.halt(ExitUtil.EC_ABNORMAL_TERMINATION);
+ LOGGER.error("Failed to write page {}", cPage, th);
+ ExitUtil.halt(ExitUtil.EC_IO_OPERATION_FAILED);
} finally {
bufferCache.returnPage(cPage);
if (DEBUG) {
@@ -61,12 +58,4 @@ public class FIFOLocalWriter implements IFIFOPageWriter {
}
}
- private void handleWriteFailure(ICachedPage page, Exception e) {
- if (failureCallback != null) {
- failureCallback.writeFailed(page, e);
- } else {
- LOGGER.error("an IO failure took place but the failure callback is
not set", e);
- }
- }
-
}