Implement truncate namespace command
Implement a command that truncates all data in a namespace.
Possible ways to implement truncation:
1) replace the namespace with an empty copy, and slowly erase all data from the exchanged copy in the background.
The advantage of this approach is that truncate is quick and non-blocking for the user
2) find a way to quickly delete all tuples in a namespace. This seems to be difficult, since even if we simply munmap() all blocks of memory, used for the namespace, it can take milliseconds on Linux when there are many blocks, which is more than is affordable.
3) A combination of 1) and 2), but do the munmap() in an offshot thread.
4) Delete tuples from the namespace one by one, yielding once in a while, until the namespace is empty.
This is the easiest and the dummiest of all. This is the one we'll implement for now.
Blueprint information
- Status:
- Complete
- Approver:
- Kostja Osipov
- Priority:
- High
- Drafter:
- Kostja Osipov
- Direction:
- Needs approval
- Assignee:
- Kostja Osipov
- Definition:
- Approved
- Series goal:
- Accepted for 1.4
- Implementation:
- Implemented
- Milestone target:
- 1.4.3
- Started by
- Kostja Osipov
- Completed by
- Kostja Osipov