-
Notifications
You must be signed in to change notification settings - Fork 177
pubsub: ensure subscription persistence consistency & remove double activation #5235
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
pubsub: ensure subscription persistence consistency & remove double activation #5235
Conversation
|
I don't get what exactly it fixes. If it fixes anything, we should have a test scenario that can reproduce the original problem... If it fixes only some upcoming implementation, it's not a fix per se. |
|
AF_UNIX socket path is the same for both persist and non-persist publications, it's a specificity of the underlying implementation, pubsub API differentiates between persistent and non-persistent topics. All the changed subscriptions are persistent, this ensures consistency with pubsub API and its promise, the fact that it works right now with socket driver is a slippery slope |
|
I wonder whether it makes sense to make the "persist" be part of the pathname for the AF_UNIX socket (so that e.g., the persistent DevicePortConfigList would have its socket be named /run/nim/DevicePortConfigList-persist.sock instead of the current /run/nim/DevicePortConfigList.sock) |
|
Still trying to understand what happened. Was it the problem that the consumer and producer had different persistence settings? And you are just adjusting them with this change? |
Exactly, I found out this problem testing nkvdriver, where I hold the promise that different persistence settings means different topics, in socketdriver we don't hone that promise, therefore it's working, but it's a bug, not a feature |
Is msrv the only place we have this inconsistency, or is it necessary to manually check all the subscribers across pillar? |
So far I've found just this one, I haven't looked into all publications and subscriptions, they'll float up with my nkv shenanigans |
|
|
Will rebase it and add some more changes later today |
|
It's stil not rebased |
eriknordmark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bb7a400 to
762f921
Compare
|
I've found one with GlobalConfig, which is perist, but msrv subscription is not, I'll check that one across services, @milan-zededa if it won't be a trouble for you during your refactoring artistic efforts, would be great if you check the consistency as well in the services you're refactoring |
|
@uncleDecart, @milan-zededa, @rucoder, I wrote a tool to check for that type of consistency. Along with the errors fixes here it also showed me this: |
|
Super cool @OhmSpectator ! I can include those fixes in my PR |
|
@uncleDecart let me know when you have updated this PR with the other fixes. |
Subscriptions _must match the persistence of their corresponding publications_. Previously, this consistency was not enforced in the msrv service, potentially causing issues—especially when using the PubSub memdriver, which requires all subscriptions to be persistent. This patch fixes the inconsistency and adds a clarifying comment to help maintain correct persistence settings in future changes. Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
762f921 to
e1b535c
Compare
|
@eriknordmark updated the PR |
eriknordmark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
it's doesn't give any effect Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
|
I've added commit to remove duplicate activation to this PR |
Description
Subscriptions must match the persistence of their corresponding publications. Previously, this consistency was not enforced in the msrv service, potentially causing issues—especially when using the PubSub memdriver, which requires all subscriptions to be persistent.
This patch fixes the inconsistency and adds a clarifying comment to help maintain correct persistence settings in future changes.
How to test and validate this PR
The issue is not seen on socketdriver since AF_UNIX socket pathname is the same for persistent and non-persistent publications
Checklist
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.