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

Implement CollectionRangeDeleter range deletion logic

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.11
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 17 (07/15/16), Sharding 18 (08/05/16)

      Implement CollectionRangeDeleter::cleanupNextRange()

      class CollectionRangeDeleter {
      public:
          CollectionRangeDeleter(NamespaceString nss);
      
          /**
           * Acquires the collection IX lock and checks whether there are new entries for the collection's
           * rangesToClean structure and if they are, deletes some small amount of entries and yields
           * using the standard query yielding logic.
           *
           * Returns true if there are more entries in the rangesToClean set or false otherwise.
           */
          bool cleanupNextRange();
      };
      

      The CollectionRangeDeleter should also invariant (possibly in debug mode only) that none of the entries in the rangesToClean set overlap with active metadata.

      In order to achieve above it is acceptable to make the CollectionRangeDeleter a friend of MetadataManager and CollectionShardingState.

            Assignee:
            leon.zaruvinsky Leon Zaruvinsky
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: