Skip to content

CXXCBC-682: Transaction replace/insert result should include post-op content#756

Merged
avsej merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-682-txn-replace-insert-content
Apr 24, 2025
Merged

CXXCBC-682: Transaction replace/insert result should include post-op content#756
avsej merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-682-txn-replace-insert-content

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

The transaction_get_result returned from ctx.replace() or ctx.insert() does not include the post-operation content. Instead it includes the pre-replace content or an empty content respectively. The specification expects that the post-operation content is returned.

Changes

  • Update insert/replace results in the create staged replace/insert methods to include the post-operation content.
  • Store the pre-transaction user flags in the staged mutation, so they can be accessed when rolling back replace or remove operations via staged_mutation::current_user_flags()
  • Add assertions to the relevant tests checking that the updated body was returned.

@DemetrisChr DemetrisChr force-pushed the CXXCBC-682-txn-replace-insert-content branch from b1d3bc1 to 330182e Compare April 24, 2025 15:57
@DemetrisChr DemetrisChr marked this pull request as ready for review April 24, 2025 16:08
@avsej avsej merged commit 63ac65f into couchbase:main Apr 24, 2025
24 of 27 checks passed
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.

2 participants