diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp index 8e51e29e7b9..cdd07aa79b9 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp @@ -268,6 +268,7 @@ DocumentSourceChangeStreamUnwindTransaction::TransactionOpIterator::TransactionO // Initialize iterators at the beginning of the transaction. _currentApplyOpsIt = _currentApplyOps.getArray().begin(); + _currentApplyOpsTs = firstTimestamp.getTimestamp(); _currentApplyOpsIndex = 0; _txnOpIndex = 0; } @@ -304,6 +305,7 @@ DocumentSourceChangeStreamUnwindTransaction::TransactionOpIterator::getNextTrans BSONType::Array == bsonOp["applyOps"].type()); _currentApplyOps = Value(bsonOp["applyOps"]); + _currentApplyOpsTs = applyOpsEntry.getTimestamp(); _currentApplyOpsIt = _currentApplyOps.getArray().begin(); _currentApplyOpsIndex = 0; } @@ -338,6 +340,7 @@ DocumentSourceChangeStreamUnwindTransaction::TransactionOpIterator::_addRequired // the current entry. newDoc.addField(DocumentSourceChangeStream::kApplyOpsIndexField, Value(static_cast<long long>(applyOpsIndex()))); + newDoc.addField(DocumentSourceChangeStream::kApplyOpsTsField, Value(applyOpsTs())); newDoc.addField(repl::OplogEntry::kTimestampFieldName, Value(_clusterTime)); newDoc.addField(repl::OplogEntry::kSessionIdFieldName, Value(_lsid)); |