Skip to content

PCBC-1048: Update all KV operations to use C++ Core API#239

Merged
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:core-rewrite
Feb 17, 2026
Merged

PCBC-1048: Update all KV operations to use C++ Core API#239
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:core-rewrite

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

For the observability changes, all operations have to use the C++ Core API, so we have control of the operation spans/metrics on the wrapper side.

Changes

For KV operations that don't already use the C++ core API, rewrite them so they use it. This means that now no operations use the C++ Public API. This does not change any behavior.

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 migrates remaining KV wrapper operations off the C++ Public API and onto the C++ Core API to enable wrapper-controlled observability (spans/metrics) without changing outward behavior.

Changes:

  • Reworked multiple KV operations (upsert/insert/replace/remove, counter ops, get variants, replica reads, subdoc lookup/mutate) to construct and execute core::operations::*_request objects.
  • Added shared request-field assignment helpers (content/flags/expiry/durability, lookup-in spec parsing) and shared response-to-PHP-result builders.
  • Updated the embedded couchbase-cxx-client submodule revision.

Reviewed changes

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

File Description
src/wrapper/conversion_utilities.hxx Adds request assignment helpers and common result construction helpers for Core API responses.
src/wrapper/conversion_utilities.cxx Moves/introduces shared helpers for legacy durability detection and lookup-in opcode decoding.
src/wrapper/connection_handle.cxx Refactors KV operation implementations to use Core API requests/execution and shared result builders.
src/deps/couchbase-cxx-client Bumps submodule to a newer C++ client revision used by the Core API changes.

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

Comment thread src/wrapper/conversion_utilities.cxx
Comment thread src/wrapper/connection_handle.cxx Outdated
Comment thread src/wrapper/connection_handle.cxx Outdated
Comment thread src/wrapper/conversion_utilities.hxx
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 4 out of 4 changed files in this pull request and generated 2 comments.


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

Comment thread src/wrapper/conversion_utilities.cxx
Comment thread src/wrapper/conversion_utilities.hxx Outdated
@DemetrisChr DemetrisChr force-pushed the core-rewrite branch 2 times, most recently from 61b5ee3 to b61a870 Compare February 17, 2026 09:47
@DemetrisChr DemetrisChr merged commit db620d4 into couchbase:main Feb 17, 2026
147 checks passed
@DemetrisChr DemetrisChr deleted the core-rewrite branch February 17, 2026 16:51
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