You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Append-only writer loses rows or commits aborted files after a data file write or close fails #612
Write rows to an append-only bucket without a write buffer, e.g. with target-file-row-num = 1 so that a later write opens a new data file.
Make a later Write(), or the data file close in PrepareCommit(), fail with an I/O error.
Retry: write again and call PrepareCommit().
What doesn't meet your expectations?
RollingFileWriter::Write() and Close() abort every data file of the writer on failure, including files it already rolled and closed, so the rows written since the last flush are gone. AppendOnlyWriter reports only the failed call and accepts later writes and commits:
after a failed Write(), later writes go to the aborted rolling writer;
after a failed close, the next PrepareCommit() sees a closed writer and returns its results, i.e. data files that were already deleted, or drops the rows if the writer was discarded.
Either way the commit no longer contains each accepted row exactly once. Expected the writer to remember the failure and return it from every later Write() and PrepareCommit(), so the caller closes it and writes the rows since the last commit again.
Anything else?
Code: src/paimon/core/append/append_only_writer.cpp, AppendOnlyWriter::Write() and AppendOnlyWriter::Flush().
Activity