diff options
author | Martin Neupauer <martin.neupauer@mongodb.com> | 2017-12-14 14:25:52 -0500 |
---|---|---|
committer | Martin Neupauer <martin.neupauer@mongodb.com> | 2017-12-18 11:19:05 -0500 |
commit | 962c5c61c93776aa4d1a8efb67a1a80cb3bb2ad0 (patch) | |
tree | 9ad8558783798d7c694ec82a4eca648e41b68ca9 /src/mongo/db/operation_context.h | |
parent | e972d40e588e9d1b920a75086f0b36c603fbdd3d (diff) | |
download | mongo-962c5c61c93776aa4d1a8efb67a1a80cb3bb2ad0.tar.gz |
SERVER-31684 Fix unexpected "operation exceeded time limit" errors
The changestream queries used an operation context deadline to track
a wait time before returning EOF. This occasionaly interfered with
normal operation deadlines leading to unexpected errors.
Diffstat (limited to 'src/mongo/db/operation_context.h')
-rw-r--r-- | src/mongo/db/operation_context.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/operation_context.h b/src/mongo/db/operation_context.h index 4d5f05ceb85..915b8060981 100644 --- a/src/mongo/db/operation_context.h +++ b/src/mongo/db/operation_context.h @@ -411,6 +411,14 @@ public: } /** + * Reset the deadline for this operation. + */ + void clearDeadline() { + _deadline = Date_t::max(); + _maxTime = computeMaxTimeFromDeadline(_deadline); + } + + /** * Returns the number of milliseconds remaining for this operation's time limit or * Milliseconds::max() if the operation has no time limit. */ |