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

cleanupOrphaned performance clarification

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      The cleanupOrphaned Performance section has wording that implies a document (or collection) scan:

      cleanupOrphaned scans the documents in the shard to determine whether the documents belong to the shard. As such, running cleanupOrphaned can impact performance; however, performance will depend on the number of orphaned documents in the range.

      However, cleanupOrphaned only makes sense with the context of the shard key so presumably uses the shard key index. The startingFromKey parameter defaults to minKey and is only valid if it matches the shard key pattern:

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/cleanup_orphaned_cmd.cpp#L97

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 48 weeks, 2 days ago