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

cleanupOrphaned performance clarification

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

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