Skip to content
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

chore: implement sharded pub/sub #4518

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

chore: implement sharded pub/sub #4518

wants to merge 3 commits into from

Conversation

kostasrim
Copy link
Contributor

@kostasrim kostasrim commented Jan 28, 2025

Resolves #3001 by adding the basic functionality for sharded pub/sub for Dragonfly cluster.

  • add sharded pub/sub
  • add slot check logic for pub sub messages
  • add test

What's left for sharded pub sub is described in #4517 but the gist is that we need to evict subscribed connections after a slot migration. This will be added in a follow up PR.


// Sharded pub sub
// Command form: SPUBLISH shardchannel message
if (cid->name() == "SPUBLISH") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to bypass DetermineKeys only for this specific case.

@kostasrim kostasrim self-assigned this Jan 28, 2025
FLAGS_fiber_safety_margin=4096 FLAGS_list_experimental_v2=true timeout 20m ctest -V -L DFLY
FLAGS_fiber_safety_margin=4096 FLAGS_list_experimental_v2=true timeout 20m ctest -V -L DFLY -E allocation_tracker

# Run allocation tracker test separately. It generates a TON of logs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allocation tracker test generates a gazillion number of logs. I silenced it that way by excluding the test from running with alsologtostderr flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 support for sharded pub/sub SPUBLISH/SSUBSCRIBE etc
1 participant