You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2026/10/10 02:39:08 UTC
[I] [lake][paimon] DV tiering skips COMPACT snapshot from the current commit [fluss]
luoyuxia opened a new issue, #4582:
URL: https://github.com/apache/fluss/issues/4582
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar. Issue #2625 concerns ordering of two distinct metadata commits; this issue concerns an APPEND/COMPACT pair from one Paimon commit and the resulting unreadable DV snapshot.
### Fluss version
main (development). The behavior was first observed with a deployment using a Paimon 1.4-red-4 fork; the current Fluss main code retains the same callback/retriever mismatch.
### Please describe the bug 🐞
With a Paimon primary-key table using deletion vectors and `table.datalake.auto-compaction=true`, a single Fluss tiering committable can produce an APPEND snapshot `A` followed by a COMPACT snapshot `C`. Paimon invokes the commit callback for both snapshots. `PaimonLakeCommitter` stores only one snapshot ID in a `ThreadLocal`, so `C` overwrites `A` and is passed to `DvTableReadableSnapshotRetriever`.
The retriever expects an APPEND ID and searches for a COMPACT strictly before the supplied ID. It therefore skips the just-committed `C`. On later commits it finds an older COMPACT, but treats the existence of its tiered Fluss metadata as proof that readable offsets are already registered. The retriever returns `null`, and Fluss registers the new `C` as tiered-only with `KEEP_ALL_PREVIOUS=-1`. Historical APPEND offsets are also fetched by APPEND ID, although the paired APPENDs were never registered in Fluss. Repeated commits can leave thousands of COMPACT-only metadata entries and no advancing readable snapshot.
Reproduction outline:
1. Create a DV-enabled Paimon primary-key table with auto-compaction enabled and tier data from Fluss.
2. Produce a commit that generates both APPEND `A` and COMPACT `C`.
3. Observe that the final callback ID is `C` and Fluss records only `C` without readable offsets.
4. Repeat. The readable snapshot does not advance and the lake metadata list grows because retention remains `-1`.
Expected: A newly committed COMPACT is evaluated as a readable-snapshot candidate, with per-bucket readable offsets no greater than that COMPACT's tiered offsets. Historical offsets needed for L0 buckets remain available, and obsolete metadata is eventually pruned.
Actual: The current COMPACT is skipped; subsequent COMPACTs are registered as tiered-only and previous metadata remains indefinitely.
PR #3519 fixes scanning and offset selection for the selected COMPACT, but does not cover this callback/ID mismatch.
### Solution
Use the committed COMPACT as the offset-bearing snapshot for the APPEND/COMPACT pair. Both snapshots of one Fluss committable should carry the same prepared `fluss-offsets` property; verify this in the target Paimon version. Evaluate the current COMPACT inclusively, read its prepared cumulative tiered-offset file before Fluss registration, and resolve a historical APPEND's offsets through its paired registered COMPACT. Register the current COMPACT once with both tiered and, when known, readable offset paths. Retention must use the registered offset carrier's ID, or `KEEP_LATEST` when no historical carrier is needed. Preserve the conservative fallback if a required source or offset file is unavailable.
Add regression coverage for a real APPEND/COMPACT pair, mixed L0 buckets, COMPACT-only Fluss history, single registration, and retention.
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [lake][paimon] DV tiering skips COMPACT snapshot from the current commit [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia closed issue #4582: [lake][paimon] DV tiering skips COMPACT snapshot from the current commit
URL: https://github.com/apache/fluss/issues/4582
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org