Skip to content

[tiering] Optimize tiering split queue and commit collection - #4457

Merged
luoyuxia merged 1 commit into
apache:mainfrom
beryllw:tiering/4455-queue-committer-optimization
Sep 22, 2026
Merged

luoyuxia merged 1 commit into
apache:mainfrom
beryllw:tiering/4455-queue-committer-optimization

Conversation

@beryllw

@beryllw beryllw commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4455

Brief change log

Tests

API and Format

Documentation

@beryllw

beryllw commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Benchmarked the before/after bookkeeping logic with JMH 1.37 and 1,000 splits per table, restricted to one logical CPU (--cpus=1 --cpuset-cpus=0).

Environment: Linux/arm64 on Apple M3 Pro, JDK 17.0.18, G1, 512 MB heap, one benchmark thread. Two forks, each with 2 × 1 s warmup and 3 × 1 s measurement.

Operation (1,000 entries per round) Before (ms/round) After (ms/round)
Queue enqueue and drain 0.044 0.015
Bucket write-result collection 8.03 0.025

Values are mean times from standalone copies of the changed logic. The benchmark excludes Flink scheduling, logging, RPC and lake I/O; these results do not represent end-to-end tiering speedups.

@beryllw

beryllw commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

@luoyuxia cc

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.

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified that would block approval.

Review effort: Lite
Findings: None

What changed in this PR

Optimizes tiering bookkeeping from quadratic to linear work while preserving split ordering and commit validation.

Changes:

  • Replaces pending split list removal with FIFO deque polling.
  • Adds incremental per-table result accumulation with deduplication and count validation.
  • Expands tests for ordering, duplicate results, inconsistent counts, and failed-round cleanup.
File Description
fluss-flink/​fluss-flink-common/​src/​test/​java/​org/​apache/​fluss/​flink/​tiering/​source/​enumerator/​TieringSourceEnumeratorTest.java Updated as part of this pull request.
fluss-flink/​fluss-flink-common/​src/​test/​java/​org/​apache/​fluss/​flink/​tiering/​source/​enumerator/​TieringSourceEnumeratorSchedulingTest.java Updated as part of this pull request.
fluss-flink/​fluss-flink-common/​src/​test/​java/​org/​apache/​fluss/​flink/​tiering/​committer/​TieringCommitOperatorTest.java Updated as part of this pull request.
fluss-flink/​fluss-flink-common/​src/​main/​java/​org/​apache/​fluss/​flink/​tiering/​source/​enumerator/​TieringSourceEnumerator.java Updated as part of this pull request.
fluss-flink/​fluss-flink-common/​src/​main/​java/​org/​apache/​fluss/​flink/​tiering/​committer/​TieringCommitOperator.java Updated as part of this pull request.

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

@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.

+1

@luoyuxia
luoyuxia merged commit 55dc685 into apache:main Sep 22, 2026
9 checks passed
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.

[lake/tiering] Reduce split queue and commit collection overhead

3 participants