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
[FIXED] KV use of JS prefix #910
Conversation
If the user creates a JS context with a custom prefix, this needs to be used for the subject of the Put() and Delete() operations. This is addressing the architecture design ADR-19. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
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
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.
Update is missing
I checked all locations of b.WriteString(kv.pre)
.
PurgeDeletes uses it but goes through the js api, hence does not count. (as js uses the prefix)
Same applies to Watch.
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.
Never Mind, update also goes through js.
LGTM
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@matthiashanel Actually, you were right. Adding the test showed that the update would fail, so we need to use the prefix there too. I added the test for that. |
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
This is essentially the same fix as nats-io/nats.go#910 in the go client, complete with test to make sure things work
This is essentially the same fix as nats-io/nats.go#910 in the go client, complete with test to make sure things work
This is essentially the same fix as nats-io/nats.go#910 in the go client, complete with test to make sure things work
If the user creates a JS context with a custom prefix, this needs
to be used for the subject of the Put() and Delete() operations.
This is addressing the architecture design ADR-19.
Signed-off-by: Ivan Kozlovic ivan@synadia.com