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.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.19, 3.6.19
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.6
    • Sprint:
      Sharding 2020-05-04, Sharding 2020-05-18

      Description

      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+.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matthew.saltz Matthew Saltz
              Reporter:
              linda.qin Linda Qin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: