Skip to content
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

[cimi] support bulk delete of resources from a collection #1695

Open
konstan opened this issue Nov 6, 2018 · 2 comments
Open

[cimi] support bulk delete of resources from a collection #1695

konstan opened this issue Nov 6, 2018 · 2 comments

Comments

@konstan
Copy link
Member

konstan commented Nov 6, 2018

Background: GNSS will be using Nuvla as its data base for storing and deleting ~10K * N SO documents per hour. (N is the number of stations - in the projects for 8 month there will be 3 stations). It would be good to have bulk delete operation based on query.

Propose where to put it in the API and make sure it doesn’t conflict with any of the current CIMI patterns.

Options:

  1. DELETE a set of objects in a collection based on CIMI filter (eg. $filter=resource:timestamp>='time_start' and resource:timestamp<='time_end')
  2. “bulk delete” operation on collections (providing list of objects to delete).
@loomis
Copy link
Contributor

loomis commented Nov 8, 2018

This can be implemented as a DELETE request to the corresponding collection resource without disrupting the standard CIMI patterns. (Typically a DELETE on the collection is not permitted.) The Elasticsearch implementation of this would be straightforward, as the Elasticsearch API supports an asynchronous "delete by query" feature. As this is asynchronous, this could be represented by a job that could keep track of the status of the delete action.

However to ensure that the constraints of the ACL are respected while using the database-level "delete by query", the "delete" access rights (at least) need to be stored with the document. Currently, only the "view" access right, which facilitate the CIMI search/query features, is stored. Supporting this feature will require a significant re-implementation of the ACL/database bindings (probably also with a new format for the ACL). After the re-implementation of this, the entire database will have to be re-indexed.

Although I'm generally in favor of doing this, it will require significant work that will disrupt other development. There needs to be a consensus before starting to implement these changes.

@loomis
Copy link
Contributor

loomis commented Nov 26, 2018

As a prerequisite for this, see the proposal for changes to the ACLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants