summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2019-02-21 16:27:03 +0000
committerBernard Gorman <bernard.gorman@gmail.com>2019-02-22 00:54:32 +0000
commit20fc08af78154399615312db92952fdcd5c61088 (patch)
tree4342339fcb96481e1fc473bff06631c306034f4b /src/mongo
parent4ac8553ce4e6cb07e0615b9c236abe18c430d68f (diff)
downloadmongo-20fc08af78154399615312db92952fdcd5c61088.tar.gz
SERVER-37786 Add new ChangeStreamFatalError code
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/base/error_codes.err1
-rw-r--r--src/mongo/db/exec/change_stream_proxy.cpp2
-rw-r--r--src/mongo/s/query/router_stage_pipeline.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/base/error_codes.err b/src/mongo/base/error_codes.err
index 511a914a311..7617572ace5 100644
--- a/src/mongo/base/error_codes.err
+++ b/src/mongo/base/error_codes.err
@@ -277,6 +277,7 @@ error_code("IndexBuildAborted", 276)
error_code("AlarmAlreadyFulfilled", 277)
error_code("UnsatisfiableCommitQuorum", 278)
error_code("ClientDisconnect", 279)
+error_code("ChangeStreamFatalError", 280)
# Error codes 4000-8999 are reserved.
# Non-sequential error codes (for compatibility only)
diff --git a/src/mongo/db/exec/change_stream_proxy.cpp b/src/mongo/db/exec/change_stream_proxy.cpp
index 46e5beb60f4..ffcb6866916 100644
--- a/src/mongo/db/exec/change_stream_proxy.cpp
+++ b/src/mongo/db/exec/change_stream_proxy.cpp
@@ -89,7 +89,7 @@ BSONObj ChangeStreamProxyStage::_validateAndConvertToBSON(const Document& event)
auto resumeToken = event.getSortKeyMetaField();
auto idField = eventBSON.getObjectField("_id");
invariant(!resumeToken.isEmpty());
- uassert(51059,
+ uassert(ErrorCodes::ChangeStreamFatalError,
str::stream() << "Encountered an event whose _id field, which contains the resume "
"token, was modified by the pipeline. Modifying the _id field of an "
"event makes it impossible to resume the stream from that point. Only "
diff --git a/src/mongo/s/query/router_stage_pipeline.cpp b/src/mongo/s/query/router_stage_pipeline.cpp
index 2c3c4e3ff70..5b75eb43880 100644
--- a/src/mongo/s/query/router_stage_pipeline.cpp
+++ b/src/mongo/s/query/router_stage_pipeline.cpp
@@ -119,7 +119,7 @@ BSONObj RouterStagePipeline::_validateAndConvertToBSON(const Document& event) {
auto resumeToken = event.getSortKeyMetaField();
auto idField = eventBSON.getObjectField("_id");
invariant(!resumeToken.isEmpty());
- uassert(51060,
+ uassert(ErrorCodes::ChangeStreamFatalError,
str::stream() << "Encountered an event whose _id field, which contains the resume "
"token, was modified by the pipeline. Modifying the _id field of an "
"event makes it impossible to resume the stream from that point. Only "