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

truncate command to provide removal of all documents without removal of metadata

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.2
    • Component/s: Performance
    • Storage Execution
    • Storage NYC 2018-07-16, Storage NYC 2018-07-30, Storage NYC 2018-08-13, Storage NYC 2018-08-27, Storage NYC 2018-09-10, Storage NYC 2018-09-24, Storage NYC 2018-10-08

      Our environment requires possibility to remove all documents from collection without reseting indexing and sharding settings.

      This is because we use staggered collections to manage throw away data which is inserted at thousands of documents per second.

      Using normal remove is very slow when you have millions of documents (we were clocking about 50k documents per second on collection with 150M documents) and you are getting inserts to the collection at the same time.

      Drop is fast but requires setting up sharding , shardkeys and indexing everytime collection is dropped. removeAll() would be same as drop but would retain indexes and other metadata.

        1. server1773.patch
          48 kB
          Ben Judd

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            jalava Jalmari Raippalinna
            Votes:
            4 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: