...
As opid is a 32-bit unsigned type internally, but is reported by currentOp as 32-bit signed type, values exceeding 2,147,483,647 are reported as negative numbers. These numbers result in uassert 26823, "invalid op", requiring users to add 2**32 themselves (using the double or NumberLong type) for killing operations. Instead accept negative opids, and do the addition in killOp.
xgen-internal-githook commented on Tue, 29 Mar 2016 21:25:03 +0000: Author: {u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'} Message: SERVER-23066 Make killOp accept negative opid (cherry picked from commit cbb3a09da470edae68fca624cca880582491a782) Branch: v3.2 https://github.com/mongodb/mongo/commit/e01ce34903ad4047bce2400ec984e31f8ec6a871 xgen-internal-githook commented on Fri, 11 Mar 2016 12:47:08 +0000: Author: {u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'} Message: SERVER-23066 Make killOp accept negative opid Branch: master https://github.com/mongodb/mongo/commit/cbb3a09da470edae68fca624cca880582491a782 geert.bosch commented on Thu, 10 Mar 2016 19:49:19 +0000: While this issue is related, SERVER-8567 is about it being desirable to not show negative opIds, while this ticket is about killOp not being able to kill using that same negative opId.
diff --git a/src/mongo/db/operation_context_impl.cpp b/src/mongo/db/operation_context_impl.cpp index b773395..7fa1e5c 100644 --- a/src/mongo/db/operation_context_impl.cpp +++ b/src/mongo/db/operation_context_impl.cpp @@ -70,7 +70,7 @@ private: const auto clientOperationInfoDecoration = Client::declareDecoration(); -AtomicUInt32 nextOpId{1}; +AtomicUInt32 nextOpId{0x80000000}; } // namespace and start a shell and do : db.fsyncLock() there and in another shell get the opid and kill it.
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.