summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorAndrii Dobroshynskyi <andrii.dobroshynskyi@mongodb.com>2020-08-03 05:22:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-07 18:01:25 +0000
commita7a9fa2b01104780e9c0e83f26621317fa7254b6 (patch)
tree1bbd431bd83552a45bbd9f913206321b46794ad4 /src/mongo/db/query
parentd0fb0f3a888f2ce8923ab03fc5d88266af7d444e (diff)
downloadmongo-a7a9fa2b01104780e9c0e83f26621317fa7254b6.tar.gz
SERVER-49727 Overload << for SBE tags and values into str::stream
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/plan_executor_sbe.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/query/plan_executor_sbe.cpp b/src/mongo/db/query/plan_executor_sbe.cpp
index 9bd146d516f..c02828cc39c 100644
--- a/src/mongo/db/query/plan_executor_sbe.cpp
+++ b/src/mongo/db/query/plan_executor_sbe.cpp
@@ -245,9 +245,11 @@ Timestamp PlanExecutorSBE::getLatestOplogTimestamp() const {
auto [tag, val] = _oplogTs->getViewOfValue();
if (tag != sbe::value::TypeTags::Nothing) {
+ const auto msgTag = tag;
uassert(4822868,
str::stream() << "Collection scan was asked to track latest operation time, "
- "but found a result without a valid 'ts' field",
+ "but found a result without a valid 'ts' field: "
+ << msgTag,
tag == sbe::value::TypeTags::Timestamp);
return Timestamp{sbe::value::bitcastTo<uint64_t>(val)};
}
@@ -261,9 +263,11 @@ BSONObj PlanExecutorSBE::getPostBatchResumeToken() const {
auto [tag, val] = _resultRecordId->getViewOfValue();
if (tag != sbe::value::TypeTags::Nothing) {
+ const auto msgTag = tag;
uassert(4822869,
- "Collection scan was asked to track resume token, "
- "but found a result without a valid RecordId",
+ str::stream() << "Collection scan was asked to track resume token, "
+ "but found a result without a valid RecordId: "
+ << msgTag,
tag == sbe::value::TypeTags::NumberInt64);
return BSON("$recordId" << sbe::value::bitcastTo<int64_t>(val));
}