Skip to content

Commit 8dd03b0

Browse files
authored
CXXCBC-310 Transaction fit test errors (#378)
When we stage an insert, and get an ambiguous fail back, we look for the doc and examine it to see if we can retry, etc... When doing so, if the doc was staged successfully, we just need to make sure the that we use the staged_mutation's content, not the content in the staged_mutation's doc, as that will have the results of looking at the document after we staged it as a tombstone, so the content will be empty. This showed up in some ambiguous fail tests in fit. Simple fix.
1 parent f4e4024 commit 8dd03b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/transactions/staged_mutation.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ staged_mutation_queue::commit_doc(attempt_context_impl* ctx, staged_mutation& it
315315

316316
result res;
317317
if (item.type() == staged_mutation_type::INSERT && !cas_zero_mode) {
318-
core::operations::insert_request req{ item.doc().id(), item.doc().content() };
318+
core::operations::insert_request req{ item.doc().id(), item.content() };
319319
req.flags = couchbase::codec::codec_flags::json_common_flags;
320320
wrap_durable_request(req, ctx->overall_.config());
321321
auto barrier = std::make_shared<std::promise<result>>();

0 commit comments

Comments
 (0)