Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23066

killOp should accept negative opid

    • Fully Compatible
    • ALL
    • Hide
      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<ClientOperationInfo>();
       
      -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.

      Show
      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<ClientOperationInfo>(); -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.
    • Integration 11 (03/14/16)

      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.

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: