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] Writer memory is not refreshed after FileStoreWrite::Compact() or a failed PrepareCommit() #613
Create a table whose writers buffer rows and report their memory, e.g. a primary-key table, with a small write-buffer-size shared by two buckets.
Write rows to bucket A until it uses most of the limit, then call FileStoreWrite::Compact() on bucket A.
Write rows to bucket B.
What doesn't meet your expectations?
MergeTreeWriter::Compact() flushes its write buffer, but AbstractFileStoreWrite::Compact() does not call writer_memory_manager_->RefreshWriterMemory() afterwards, unlike PrepareCommit(). The memory manager keeps the old usage of bucket A, so writing to bucket B triggers a flush although the memory was already released.
PrepareCommit() has the same gap on failure: it refreshes the memory only after the writer's PrepareCommit() succeeded, although the writer may have flushed its buffer before failing.
Expected the memory of the writer to be refreshed after Compact(), and after the writer's PrepareCommit() whether or not it succeeded.
Anything else?
Code: src/paimon/core/operation/abstract_file_store_write.cpp, AbstractFileStoreWrite::Compact() and AbstractFileStoreWrite::PrepareCommit(). Append-only writers with write buffers would hit the same gap.
Activity