-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow purging by partition #4180
Comments
Hey @aalegriadg, thanks for reporting. It may take time to support purging against partition/database inside CouchDB if it is an agreed approach in the community. Is it possible to use script to get document list from partition/database and then purge them one by one as one quick way? |
Hi! Thank you for your reply Based on your comment, I have modified the description,adding the benefits that this new query could bring. As you can see, this functionality would be very useful for my team and we would be very willing to contribute to it. |
@aalegriadg thanks for feedback and contribution. Want to check you or your team will make PR or let us work together for that? |
We do not have in the team people with experience in Erlang, but we could fund the feature, trying to accelerate it, because we are very interested in it. We would also be interested in a function that returns the existing partitions in the database, of the type |
Summary
Currently the request to purge a number of documents in the database, must include the document IDs, and for each document ID, one or more revisions that must be purge . This request does not allow to include ids of partitions to purge.
https://docs.couchdb.org/en/stable/api/database/misc.html
Desired Behaviour
client.post(f"{url}/{self._database.database_name}/_purge", json=doc)
where:
json={partition1_id, partition2_id, partition3_id}
Result: Purged all documents from
partition1_id
,partition2_id
ypartition3_id
Additional context
In my project, we are working with temporary replication windows: Documents are stored by daily partitions and when they are considered old enough they are not replicated and furthermore, they are purged.
Therefore, it would be very useful to be able to make a purge request that allows as input argument the ids of the partitions to purge.
Benefit
It is more efficient to do a single purge query indicating the id of the partition to purge than:
Performing all these steps on a low computational device implies a high deletion time.
The text was updated successfully, but these errors were encountered: