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] Files of buckets prepared before a failed PrepareCommit() are orphaned, and a retry commits without them #611
Create an append table with two buckets and write rows to both.
Make PrepareCommit() succeed for the first bucket visited and fail for the second, e.g. with an I/O error while closing its data file.
Retry PrepareCommit() in streaming mode, or close the write.
What doesn't meet your expectations?
AbstractFileStoreWrite::PrepareCommit() drains the increment of each bucket in turn. When a later bucket fails, the commit messages already built for the earlier buckets are dropped with the result:
their new data files and compaction outputs are never committed and stay in the table directory, and Close() no longer knows about them;
in streaming mode, a retry of PrepareCommit() commits without those increments, since their writers have nothing left to drain, so the rows are lost.
Expected the files of the dropped increments to be deleted, at least for append-only tables, whose files are all newly written, and a retry after such a failure to be rejected rather than silently committing without them.
Activity