-
Notifications
You must be signed in to change notification settings - Fork 1.1k
purge deleted documents that exceed TTL #5655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
bca189f
to
cf347a7
Compare
Draft as I still need to do a better database-level config for the override. |
cf347a7
to
62edb67
Compare
|
||
.. config:section:: couch_auto_purge_plugin :: Configure the Auto Purge plugin | ||
.. config:option:: deleted_document_ttl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the name. Previously when discussing this we used the term tombstones, which it was descriptive it would be a new term for users to learn.
In the future it would be easier to also have a deleted_conflict_ttl
which could be handled by the purge mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I like the new name, and it leaves open the possibility of a document_ttl
too (for non-deleted documents).
This look pretty compact!
I'll look into adding a way to set and gets for the database level config. Hopefully as properties in the shard docs. We have some precent in resharding when we update the shard map:
|
13ce28b
to
aeb78a7
Compare
have added a commit that does the get/set of a database-level override into the _dbs document. I've placed it outside of the "props" object for now, but that's a discussion. I also deliberately don't add this property into the #shard{} records that mem3 would return as I'm trying to establish the database level property as a single value. |
noting that |
b1172e3
to
60ddb11
Compare
60ddb11
to
5228b5b
Compare
Yeah something like get/set can work and agree I am not a fan of how Props also has a bit of an extra benefit that it will automatically show up in the dbs_info result so users can inspect them the flags. So far I have been trying to extract the "update shard map" bit from mem3_reshard and make it a general utility. It's got some resharding specific bits in there and perhaps extra belts and suspenders like for instance:
Some of theses are there to protect against creating conflicts or handle the case where the ring may have just broken and such but maybe some of it overkill, too. |
Overview
Add a plugin to automatically purge deleted documents after a configurable interval has lapsed. This should be set high enough that all external consumers of the changes feed will have seen and processed the deleted documents. The plugin uses CouchDB's purge facility which ensures internal replication and indexes have processed the deletions before the deleted document is purged.
Testing recommendations
covered by eunit tests.
Related Issues or Pull Requests
N/A
Checklist
rel/overlay/etc/default.ini
src/docs
folder