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

Same KV operations fail on R1 vs R3 #5840

Closed
MauriceVanVeen opened this issue Aug 28, 2024 · 0 comments · Fixed by #5841
Closed

Same KV operations fail on R1 vs R3 #5840

MauriceVanVeen opened this issue Aug 28, 2024 · 0 comments · Fixed by #5841

Comments

@MauriceVanVeen
Copy link
Member

If replicas is set to 1, this test fails:

--- a/server/jetstream_cluster_4_test.go
+++ b/server/jetstream_cluster_4_test.go
@@ -3048,7 +3048,7 @@ func TestJetStreamClusterKeyValueLastSeqMismatch(t *testing.T) {

        kv, err := js.CreateKeyValue(&nats.KeyValueConfig{
                Bucket:   "mismatch",
-               Replicas: 3,
+               Replicas: 1,
        })
        require_NoError(t, err)
1 lastseq 2
    jetstream_cluster_4_test.go:3070: require error, but got none
--- FAIL: TestJetStreamClusterKeyValueLastSeqMismatch (0.52s)

Is that expected? Seems unexpected that clustered-ness would affect the outcome of the KV operations.

Originally posted by @cbrewster in #5821 (comment)

derekcollison pushed a commit that referenced this issue Aug 28, 2024
A regression was introduced in
#5821 where CAS operations on
a R1 stream would succeed even if they should be rejected. Whereas on
R3/clustered they would be rejected.

Resolves: #5840

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
wallyqs added a commit that referenced this issue Aug 28, 2024
A regression was introduced in
#5821 where CAS operations on
a R1 stream would succeed even if they should be rejected. Whereas on
R3/clustered they would be rejected.

Resolves: #5840

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
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 a pull request may close this issue.

1 participant