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

When the Range Deleter is waiting for the open cursors, list these cursors in the logs.

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.19, 3.6.19
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v3.6
    • Sharding 2020-05-04, Sharding 2020-05-18

      In 3.4 and earlier, when the Range Deleter is waiting for the open cursors, it lists these cursors in the logs as below. In this case, we can just run the killCursors command to kill them, to unblock the range deleter (and chunk migration to this shard) when needed.

      [RangeDeleter] waiting for open cursors before removing range [{ KEY: VALUE1}, { KEY: VALUE2}) in DATABASE.COLLECTION, elapsed secs: N, cursor ids: [XXX, ...]
      

      However, in 3.6 and above, the message is different and doesn't include the cursor id(s):

      Deletion of DATABASE.COLLECTION range [{ KEY: VALUE1 }, { KEY: VALUE2 }) will be scheduled after all possibly dependent queries finish
      

      The listCursors command is only added since 4.2, so for 3.6 and 4.0, it's a bit difficult to locate these cursors. We may have to restart the application or step down the primary, in order to kill these cursors/unblock the chunk migration to this shard. This is more destructive than just killing the cursors if we know the cursor ids.

      As such, if the Range Deleter is waiting for the open cursors, it would be nice to also list these cursor ids in MongoDB 3.6+.

            Assignee:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Reporter:
            linda.qin@mongodb.com Linda Qin
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: