[lake/paimon] Prevent concurrent local lookup false misses - #4158
Merged
luoyuxia merged 2 commits intoSep 1, 2026
Conversation
Serialize access to Paimon 2.0 LocalTableQuery because lookup store readers share mutable comparator state across files. Add a concurrent cold-cache regression test for distinct partitions. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-5 AI-Contributed/Feature: 21/21 AI-Contributed/UT: 126/126
luoyuxia
marked this pull request as ready for review
August 31, 2026 12:25
Link the upstream Paimon concurrency bug and record the Fluss-side LocalTableQuery fallback for restoring concurrent lookups. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-5 AI-Contributed/Feature: 4/4 AI-Contributed/UT: 0/0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: apache/paimon#9483
Paimon 2.0 allows lookups for different partition-buckets to run concurrently, but their local lookup-store readers share a comparator with mutable reader state. Concurrent lookups against different files can therefore return
nullfor existing keys.This PR adds a Fluss-side correctness workaround while the problem is addressed upstream. Calls to one
LocalTableQueryare serialized, including the retry after refreshing stale files. Consequently, a cache hit waits while another lookup on the same table is downloading a local lookup file.Brief change log
LocalTableQuery.lookupwith a dedicated per-lookuper lock.Tests
./mvnw -pl fluss-lake/fluss-lake-paimon -Dtest=PaimonLakeTableLookuperTest test./mvnw install -DskipTests -pl fluss-lake/fluss-lake-paimon -amAPI and Format
No API or storage format changes.
Documentation
No documentation changes. This is a correctness workaround for an upstream concurrency issue.