Skip to content

Subscription: detect outdated subscription event for better consumer exception control #15326

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

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

VGalaxies
Copy link
Contributor

As title.

@SteveYurongSu SteveYurongSu self-assigned this Apr 14, 2025
@SteveYurongSu SteveYurongSu requested a review from Copilot April 14, 2025 01:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java:1022

  • [nitpick] Verify that comparing the payload with ErrorPayload.OUTDATED_ERROR_PAYLOAD using Objects.equals relies on reference equality as intended. If a different instance is ever used for outdated errors, this check may fail.
if (Objects.equals(payload, ErrorPayload.OUTDATED_ERROR_PAYLOAD)) {

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java:602

  • [nitpick] Ensure that the assumption of commit IDs being monotonically increasing, as used in the outdated check, is documented and covered with unit tests to prevent potential misinterpretations in the future.
return PipeDataNodeAgent.runtime().getRebootTimes() > commitContext.getRebootTimes() || initialCommitId > commitContext.getCommitId();

@SteveYurongSu SteveYurongSu merged commit 95ed457 into apache:master Apr 17, 2025
49 of 50 checks passed
@VGalaxies VGalaxies deleted the sub-outdated branch April 17, 2025 03:43
VGalaxies added a commit to VGalaxies/iotdb that referenced this pull request Apr 17, 2025
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.

2 participants