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

Incorrect number of subscriptions in streaming/serverz when durables are resumed #819

Closed
kozlovic opened this issue May 2, 2019 · 3 comments · Fixed by #820 or #827
Closed

Incorrect number of subscriptions in streaming/serverz when durables are resumed #819

kozlovic opened this issue May 2, 2019 · 3 comments · Fixed by #820 or #827

Comments

@kozlovic
Copy link
Member

kozlovic commented May 2, 2019

The reported number of subscriptions increases every time a durable (queue or not) is restarted.

@selstam
Copy link

selstam commented May 2, 2019

@kozlovic Is it just the reported number or the actual number of subscriptions? Do you still need the debug information?

@kozlovic
Copy link
Member Author

kozlovic commented May 2, 2019

Is it just the reported number or the actual number of subscriptions?

Just the reported number. You can verify with /streaming/channelsz?channel=<name>&subs=1 and you should see just the subscriptions you have restarted.

Do you still need the debug information?

No thanks!

kozlovic added a commit that referenced this issue May 3, 2019
The number of subscriptions was incorrectly increasing when a durable
subscription was resumed.

The proper behavior is as follows:
- a durable is started for the first time, count increases
- this durable is closed (but not unsubscribed), count unchanged
- durable is unsubscribed, count decreases
- a durable queue group is created, count increases
- a member added, count increases
- a member leaves, count decreases
- the last member leaves (but group remains because durable), count
  is unchanged.
- group is unsubscribed, count decreases.

for non durable subscriptions (queue or not), when a subscription
is created, count increases, when closed or unsubscribed, count
decreases.

Resolves #819

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic
Copy link
Member Author

kozlovic commented May 3, 2019

@selstam If you can try to build from the PR and test, it would be great.

kozlovic added a commit that referenced this issue May 6, 2019
Replaces the use of a variable that was supposed to be updated
on subscription create/remove. It was started to be a bit brittle.

Provide a function that computes the number of subscriptions
(including offline durables/queue durables).
This is a bit more costly than using the variable but will be
less prone to issues.

Resolves #819

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
kozlovic added a commit that referenced this issue May 6, 2019
Replaces the use of a variable that was supposed to be updated
on subscription create/remove. It was started to be a bit brittle.

Provide a function that computes the number of subscriptions
(including offline durables/queue durables).
This is a bit more costly than using the variable but will be
less prone to issues.

Resolves #819

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants