Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10446

Docs for SERVER-29405: After move chunk out, pause for secondary queries to drain

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: Server
    • Labels:

      Documentation Request Summary:

      A new server startup setParameter, orphanCleanupDelaySecs, needs to be documented, along with usage advice.

      Engineering Ticket Description:

      When moving a chunk off a shard finishes, secondary read queries might still depend on the chunk. We need to obey a cluster-wide config parameter that specifies how long after each chunk move completes before we begin actually deleting documents in the range, because secondaries don't have any choice about performing deletes as they appear in the oplog, and must kill any dependent queries still running.

      By default, range deletion on an emigrated chunk, or any range deletion on a range that a running query still depends on, is delayed until all such queries terminate, or 15 minutes, whichever is longer. Other range deletions proceed in the meantime, most particularly of ranges about to be migrated in. The delay is configurable per-server with e.g.

      {setParameter: {orphanCleanupDelaySecs: 0}}
      

      In tests this value is set to 2.

      This behavior will probably need integration into management tools. For example, when migrating chunks off of a shard whose storage usage has been found to be growing at an alarming rate, it probably should be reduced, temporarily, to zero. Users who run queries on shard secondaries that run over 15 minutes may want to increase it. Users who run queries on secondaries that always complete in much less than 15 minutes may want to reduce it.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 26 weeks, 6 days ago