-
Notifications
You must be signed in to change notification settings - Fork 492
[lake] Re-initial tiering splits for tables if reader failover happen #1984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements failover handling for the lake tiering feature by detecting reader failover through attempt number tracking. It also introduces a VALUES lake format for testing purposes.
Key Changes
- Implements failover detection in
TieringSourceEnumeratorby tracking reader attempt numbers to reinitialize tiering splits when failover occurs - Removes the explicit
TieringFailOverEventmechanism in favor of automatic detection via attempt number monitoring - Adds a comprehensive VALUES lake storage implementation for testing tiering functionality with failure injection capabilities
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java |
Critical: Adds failover detection logic but calls non-existent registeredReadersOfAttempts() method on standard Flink API |
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/committer/TieringCommitOperator.java |
Removes explicit failover event sending from setup method |
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/source/enumerator/FlussMockSplitEnumeratorContext.java |
Adds mock context supporting attempt number tracking for tests |
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java |
Updates tests to use new mock context and validate failover scenarios |
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java |
Adds end-to-end integration test for tiering failover with write failure injection |
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/* |
Implements complete VALUES lake storage plugin for testing |
fluss-common/src/main/java/org/apache/fluss/metadata/DataLakeFormat.java |
Adds VALUES data lake format enum value |
fluss-common/src/main/java/org/apache/fluss/row/encode/KeyEncoder.java |
Adds VALUES format support to key encoder factory |
fluss-common/src/main/java/org/apache/fluss/bucketing/BucketingFunction.java |
Adds VALUES format support to bucketing function factory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Outdated
Show resolved
Hide resolved
...k/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java
Outdated
Show resolved
Hide resolved
...k/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java
Outdated
Show resolved
Hide resolved
...k/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
luoyuxia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beryllw Thanks for the pr. Left some comments. PTAL
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java
Outdated
Show resolved
Hide resolved
.../test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java
Outdated
Show resolved
Hide resolved
...k/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java
Outdated
Show resolved
Hide resolved
...k/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TieringFailoverITCase.java
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-common/src/main/java/org/apache/fluss/metadata/DataLakeFormat.java
Outdated
Show resolved
Hide resolved
c026d94 to
71648c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
...t/java/org/apache/fluss/flink/tiering/source/enumerator/FlussMockSplitEnumeratorContext.java
Outdated
Show resolved
Hide resolved
...-flink-common/src/test/java/org/apache/fluss/lake/values/TestingValuesLakeStoragePlugin.java
Outdated
Show resolved
Hide resolved
...ss-flink-common/src/test/java/org/apache/fluss/flink/tiering/FlinkValuesTieringTestBase.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
...uss-flink-common/src/test/java/org/apache/fluss/lake/values/tiering/ValuesLakeCommitter.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java
Show resolved
Hide resolved
luoyuxia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beryllw Thanks for the pr. Left minor comments. PTAL
...ink-common/src/main/java/org/apache/fluss/flink/tiering/committer/TieringCommitOperator.java
Show resolved
Hide resolved
.../test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/lake/values/ValuesLake.java
Outdated
Show resolved
Hide resolved
...uss-flink-common/src/test/java/org/apache/fluss/lake/values/tiering/ValuesLakeCommitter.java
Outdated
Show resolved
Hide resolved
.../fluss-flink-common/src/test/java/org/apache/fluss/lake/values/tiering/ValuesLakeWriter.java
Outdated
Show resolved
Hide resolved
...ss-flink-common/src/test/java/org/apache/fluss/flink/tiering/FlinkValuesTieringTestBase.java
Outdated
Show resolved
Hide resolved
luoyuxia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Purpose
Linked issue: close #1929
Brief change log
Tests
API and Format
Documentation