[SERVER-1773] truncate command to provide removal of all documents without removal of metadata Created: 10/Sep/10 Updated: 06/Dec/22 Resolved: 14/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | 1.6.2 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jalmari Raippalinna | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Won't Do | Votes: | 4 |
| Labels: | QFB | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||
| Sprint: | 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 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Connie Chen [ 14/Mar/22 ] |
|
Closing this as this is a non-trivial amount of work and we haven't heard any interest in the last couple of years. |
| Comment by Asya Kamsky [ 09/Jul/18 ] |
|
I think we should be consistent with remove and drop for non-existent collections/dbs. |
| Comment by Ben Judd [ 06/Jul/18 ] |
|
asya What is the preferred behavior when the collection/db specified do not exist, an ok:1, with a message letting them know or should the command fail? |
| Comment by Eliot Horowitz (Inactive) [ 26/Sep/10 ] |
|
Called truncate in other systems |