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

killOp should accept negative opid

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      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.
    • Sprint:
      Integration 11 (03/14/16)
    • Case:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: