Skip to content

Subscription: clean up consumers after abrupt disconnect - #18434

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/subscription-consumer-disconnect-timeout
Open

Subscription: clean up consumers after abrupt disconnect#18434
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/subscription-consumer-disconnect-timeout

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Summary

  • retain disconnected subscription receivers until server-side inactivity cleanup completes
  • serialize request, reconnect, exit, and timeout handling per consumer identity, fencing obsolete connections after reconnect
  • keep timeout state retryable when consumer cleanup fails, and remove it after explicit close or successful timeout cleanup

Motivation

An abruptly terminated consumer does not send close or unsubscribe requests. The server previously removed its receiver from timeout tracking and cleared the receiver's shared consumer state during connection cleanup, so the orphaned consumer could retain uncommitted subscription data indefinitely. That retained data can exhaust shared subscription memory and block message admission for unrelated topics and consumers.

Tests

  • mvn -o -nsu spotless:check -pl iotdb-core/datanode
  • targeted Checkstyle for SubscriptionReceiver*.java (0 violations)
  • SubscriptionReceiverAgentTest: 4 tests passed
  • SubscriptionReceiverV1Test: 9 tests 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.

1 participant