Skip to content

[server] Remove lookup lock for PaimonLakeTableLookuper - #4050

Merged
luoyuxia merged 6 commits into
apache:mainfrom
zuston:removeSync1
Aug 30, 2026
Merged

[server] Remove lookup lock for PaimonLakeTableLookuper#4050
luoyuxia merged 6 commits into
apache:mainfrom
zuston:removeSync1

Conversation

@zuston

@zuston zuston commented Aug 20, 2026

Copy link
Copy Markdown
Member

Purpose

Paimon 1.3.1 serializes calls to LocalTableQuery.lookup , limiting the throughput of Fluss’s PaimonLakeTableLookuper . Paimon 2.0 supports concurrent lookups, so Fluss should avoid imposing an additional concurrency restriction at its own layer. This allows users running Paimon 2.0—or a custom-patched earlier version—to benefit from concurrent lookups and improved performance.

This PR aims to fully leverage Paimon 2.0’s concurrent lookup capabilities, made possible by #4093.

Brief change log

  • Remove the Fluss-level lookup lock to enable concurrent Paimon lookups.

Tests

API and Format

Documentation

@zuston

zuston commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

PTAL @luoyuxia . this has been validated in the initial benchmark

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes Fluss-level serialization in PaimonLakeTableLookuper to enable higher-throughput concurrent lookups by relying on Paimon’s concurrency support, while refactoring internal state to avoid shared mutable per-lookup encoders/partition helpers.

Changes:

  • Removed the synchronized lookup/close lifecycle lock and introduced lazy-init locking only.
  • Reworked lookup-file tracking/metrics to be per-thread via ThreadLocal + try-with-resources helper.
  • Refactored file registration/refresh to use a concurrent per-partition-bucket registry and per-call encoders/projections.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zuston

zuston commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

cc @luoyuxia

@luoyuxia luoyuxia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zuston Thanks for the pr. lgtm overall. Just left minor comments. PTAL

Clarify the file refresh helper responsibilities through method names and make TrackingMetrics a static nested class.

Co-Authored-By: Codex <noreply@openai.com>

AI-Model: gpt-5
AI-Contributed/Feature: 12/12
AI-Contributed/UT: 0/0
@luoyuxia

Copy link
Copy Markdown
Contributor

I append a small commit to address the minor comments

@luoyuxia
luoyuxia merged commit 9f6a698 into apache:main Aug 30, 2026
9 checks passed
@zuston
zuston deleted the removeSync1 branch August 30, 2026 12:49
@zuston

zuston commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

I append a small commit to address the minor comments

Thank @luoyuxia for your review in the weekend !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants