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

Implement CollectionRangeDeleter range deletion logic

    XMLWordPrintableJSON

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: