Skip to content

CBG-5411: Uptake Rosmar Incr fix#8300

Merged
bbrks merged 1 commit into
mainfrom
CBG-5411
May 27, 2026
Merged

CBG-5411: Uptake Rosmar Incr fix#8300
bbrks merged 1 commit into
mainfrom
CBG-5411

Conversation

@bbrks

@bbrks bbrks commented May 27, 2026

Copy link
Copy Markdown
Member

@bbrks bbrks requested a review from gregns1 May 27, 2026 13:12
Copilot AI review requested due to automatic review settings May 27, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Uptakes a newer github.com/couchbaselabs/rosmar revision containing the upstream Incr behavior fix (CBG-5411) and adds a parity test to codify the expected Incr contract across Rosmar and Couchbase Server-backed buckets.

Changes:

  • Bump github.com/couchbaselabs/rosmar to v0.0.0-20260527130952-42bfa64e0a8e.
  • Add TestIncrParity to validate Incr semantics (missing vs existing keys, amt=0 CAS behavior, wraparound behavior, and large def behavior).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
go.mod Updates the Rosmar dependency to the newer pseudo-version containing the Incr fix.
go.sum Updates checksums to match the new Rosmar version.
base/bucket_gocb_test.go Adds a parity test matrix for DataStore.Incr behavior (CAS, overflow/wrap, and default handling).

Comment thread base/bucket_gocb_test.go
// - On a missing key, the delta is not applied — the stored value is def.
// - def must fit in int64. CBS's gocb adapter casts def to int64; values
// > math.MaxInt64 are interpreted as "do not create if absent" and return
// KEY_ENOENT. Rosmar matches this by returning MissingError.
Comment thread base/bucket_gocb_test.go
Comment on lines +399 to +404
if tc.expectErr {
require.Error(t, incrErr, "expected Incr to error")
if tc.existingValue == nil {
_, _, postErr := dataStore.GetRaw(ctx, key)
require.Error(t, postErr, "doc should not exist after a failed Incr on missing key")
}
@bbrks bbrks merged commit 3811579 into main May 27, 2026
49 checks passed
@bbrks bbrks deleted the CBG-5411 branch May 27, 2026 14:15
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.

3 participants