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

Move removed variants into a trash bin #831

Closed
j-coll opened this issue Apr 27, 2018 · 0 comments
Closed

Move removed variants into a trash bin #831

j-coll opened this issue Apr 27, 2018 · 0 comments
Assignees
Milestone

Comments

@j-coll
Copy link
Member

j-coll commented Apr 27, 2018

When removing the last study from a variant, the variant has to be removed, as it does not belong to any study any more. In order to keep track of the removed variants, and keep updated the SearchIndex (there may be other use cases in the future), those removed variants should be stored in some kind of "trash"

Storage MongoDB

When removing empty variants, the identifier should be moved to a new collection trash. The VariantMongoDBAdaptor should gain this methods:

+-------------------
| VariantMongoDBAdaptor
|-------------------
| + trashedVariants(timeStamp : long) : VariantDBIterator
| + cleanTrash(timeStamp : long) : long
+-------------------

Storage Hadoop

This does not apply yet to storage-hadoop, since the variants are never removed from the table, even if all the studies are removed.
Nothing to do.

Questions:

  • What if we load a variant that is already in the trash bin?
    First remove trashed variants. Then load new variants. If a deleted variant is then loaded, and is in both collections, it will be first removed from solr and then loaded again, as the timestamp is greater than the current timestamp.
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

1 participant