Skip to content

Commit fa57778

Browse files
authored
fix(core): fix assertion exception in writer, which is triggered by OS error (#6204)
1 parent a970b1c commit fa57778

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/main/java/io/questdb/cairo/TableWriter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5456,6 +5456,11 @@ private void handleColumnTaskException(
54565456

54575457
private void handleHousekeepingException(Throwable e) {
54585458
// Log the exception stack.
5459+
// In some cases it is possible to leave corrupted state of table writer behind, for example in
5460+
// the case where we discovered we need to distress the writer - exception occurring trying to re-open
5461+
// last partition can leave some columns in "closed" state, with "fd=-1" but that does not stop O3 logic
5462+
// processing -1 as a correct fd leading to havoc.
5463+
distressed = true;
54595464
LOG.error().$("data has been persisted, but we could not perform housekeeping [table=").$(tableToken)
54605465
.$(", error=").$(e)
54615466
.I$();

0 commit comments

Comments
 (0)