Skip to content

Conversation

@micpapal
Copy link
Member

@micpapal micpapal commented Jan 27, 2026

Description

Previously, when multiple consumers within a session subscribed to the same name, each subscription would send a separate subscribe message to the data plane. Similarly, each unsubscribe would send an unsubscribe message. This lead to issues where a subscription was removed from the data plane while other consumers still needed it.

This PR implements reference counting in the subscription table to prevent this problem. It also removes the session route cache in the session layer as the ref count is now directly implemented in the subscription table.

Ref: #1138

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@micpapal micpapal linked an issue Jan 27, 2026 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 27, 2026, 10:47 AM

@micpapal micpapal marked this pull request as ready for review January 27, 2026 10:39
@micpapal micpapal requested a review from a team as a code owner January 27, 2026 10:39
Signed-off-by: Michele Papalini <[email protected]>
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 92.94118% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ane/core/datapath/src/tables/subscription_table.rs 92.07% 18 Missing ⚠️

📢 Thoughts on this report? Let us know!

@micpapal micpapal self-assigned this Jan 27, 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.

add reference count to subscription table

2 participants