-
Notifications
You must be signed in to change notification settings - Fork 530
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
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix consuming TubeMQ data twice #10440
Merged
Conversation
This file contains 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
vernedeng
reviewed
Jun 18, 2024
...-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/metric/MetricsCollector.java
Outdated
Show resolved
Hide resolved
EMsnap
reviewed
Jun 18, 2024
.../sort-connectors/tubemq/src/main/java/org/apache/inlong/sort/tubemq/FlinkTubeMQConsumer.java
Show resolved
Hide resolved
EMsnap
reviewed
Jun 18, 2024
...c/main/java/org/apache/inlong/sort/tubemq/table/DynamicTubeMQTableDeserializationSchema.java
Outdated
Show resolved
Hide resolved
vernedeng
reviewed
Jun 18, 2024
...c/main/java/org/apache/inlong/sort/tubemq/table/DynamicTubeMQTableDeserializationSchema.java
Outdated
Show resolved
Hide resolved
XiaoYou201
changed the title
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix TubeMQ data twice.
Jun 18, 2024
XiaoYou201
changed the title
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix TubeMQ data twice.
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix TubeMQ data twice
Jun 18, 2024
EMsnap
reviewed
Jun 18, 2024
...-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/metric/MetricsCollector.java
Outdated
Show resolved
Hide resolved
EMsnap
reviewed
Jun 18, 2024
.../sort-connectors/tubemq/src/main/java/org/apache/inlong/sort/tubemq/FlinkTubeMQConsumer.java
Outdated
Show resolved
Hide resolved
...rt/sort-flink/base/src/main/java/org/apache/inlong/sort/base/metric/SourceExactlyMetric.java
Show resolved
Hide resolved
EMsnap
previously approved these changes
Jun 19, 2024
EMsnap
approved these changes
Jun 19, 2024
aloyszhang
approved these changes
Jun 19, 2024
XiaoYou201
changed the title
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix TubeMQ data twice
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once And fix consuming TubeMQ data twice
Jun 19, 2024
dockerzhang
approved these changes
Jun 19, 2024
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.
[INLONG-10311][Sort] Implement TubeMQ Source report audit information exactly once
Fixes #10311
Motivation
Now,every connectors report audit information only support at least once. So,This pr base it to implements report audit information exactly once. The audit information will not be wrong in much exception situation.
Modifications
Each Source/Sink will save the checkpointId of the currently ongoing checkpoint, which is nowCheckpointId in the figure. When the audit information is written to the Buffer, nowCheckpointId will be attached, indicating that the audit information
is written during this ongoing checkpoint. The audit information and checkpointId are in a many-to-one relationship.
When a snapshot request is received, the current operator's nowCheckpointId is updated to (snapshot) checkpointId + 1. When all operators in a task complete the snapshot, the notifyCompleteCheckpoint method is called back.
At this time, AuditBuffer uploads audit information less than or equal to checkpointId (parameters in the notifyCompleteCheckpoint method).