Skip to content

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

Merged
SteveYurongSu merged 2 commits intoapache:masterfrom
VGalaxies:sub-outdated
Apr 17, 2025
Merged

Subscription: detect outdated subscription event for better consumer exception control#15326
SteveYurongSu merged 2 commits intoapache:masterfrom
VGalaxies:sub-outdated

Conversation

@VGalaxies
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
SteveYurongSu pushed a commit that referenced this pull request Apr 21, 2025
JackieTien97 pushed a commit that referenced this pull request May 14, 2025
Caideyipi pushed a commit to Caideyipi/iotdb that referenced this pull request Mar 25, 2026
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