-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
apiblockeddocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestepicgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtype:compaction
Description
Is your feature request related to a problem? Please describe.
Sometimes it is desired to have expiration for items in the database. For example, a session store where sessions expire, or a cache with simple expiry times. In such cases, deletion is not required to happen immediately, but it is still preferred to eventually get rid of the expired or stale data at some point.
Describe the solution you'd like
RocksDB allows the user to specify a compaction filter, but I am not sure if this idea would work in Fjall. The compaction filter can exclude k/v pairs during compaction, therefore deleting them.
Alternatively something else that can efficiently accomplish the same.
Describe alternatives you've considered
- Delete expired values when reading: works (and would be required even if such a feature were implemented) but requires a value to be read before it can be deleted. Stale values will still get compacted, which might be a waste of resources.
- Periodically scan the keyspace and delete expired values: requires scanning entire keyspace, probably less efficient than compaction filter.
Additional context
N/A
Metadata
Metadata
Assignees
Labels
apiblockeddocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestepicgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtype:compaction