Skip to content

RCBC-542: Forward CAS to C++ Core in Append/Prepend#225

Merged
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:RCBC-542-append-prepend-cas
Apr 16, 2026
Merged

RCBC-542: Forward CAS to C++ Core in Append/Prepend#225
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:RCBC-542-append-prepend-cas

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

The CAS option was being ignored in the append & prepend operations, and not being passed on to the C++ core.

Changes

  • Include the CAS in the core request, if provided.
  • Add tests for append/prepend with bad CAS

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes CAS handling for binary append/prepend by ensuring the CAS option is forwarded from the Ruby layer into the C++ core request, and adds regression tests for CAS mismatch behavior.

Changes:

  • Forward cas from Ruby options into core::operations::{append,prepend}_request.
  • Add tests asserting append/prepend raise Couchbase::Error::CasMismatch when given a bad CAS.
  • Pin development OpenTelemetry gem versions in Gemfile.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ext/rcb_crud.cxx Adds cb_extract_cas(req, options) to append/prepend backend operations so CAS is included in core requests.
test/crud_test.rb Adds regression tests for CAS mismatch on binary append/prepend.
Gemfile Pins opentelemetry-metrics-sdk and opentelemetry-sdk versions for development.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/crud_test.rb Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/crud_test.rb
Comment thread test/crud_test.rb
Comment thread Gemfile
@DemetrisChr DemetrisChr merged commit 3e56723 into couchbase:main Apr 16, 2026
44 of 47 checks passed
@DemetrisChr DemetrisChr deleted the RCBC-542-append-prepend-cas branch April 16, 2026 15:54
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