-
Notifications
You must be signed in to change notification settings - Fork 6
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
Ensure DiSCO deletions are handled correctly by indexer #176
Comments
…") events properly. Addresses rmap-project#176
…") events properly. Addresses rmap-project#176
* Indexer now removes documents in the index that pertain _only_ to the tombstoned DiSCO (the indexer used to remove the entire lineage) * Includes an IT based on the information in #176.
@karenhanson can this be closed? IIRC, there is no support for "hard deletes" anywhere in RMap, so at the moment the indexer doesn't need to support them. If hard delete support needs to be tracked, maybe we can add an issue for that separately? |
Ah @karenhanson I see hard-delete is a function of the admin tool. Let me see if I can easily update the indexer to accommodate. |
@karenhanson ok, it looks like the code should accommodate hard-deletes: the indexer treats them the same as tombstones (the documents for the deleted disco are removed from the index). What is missing is an integration test for hard-delete. Is there a way I can simulate a hard-delete using the API or UI in an integration test? |
@emetsger This test simulates delete: rmap/webapp/src/test/java/info/rmapproject/webapp/controllers/AdminToolControllerTest.java Lines 233 to 252 in be5a424
This is the method that actually does the deletion work - it creates an Admin Agent in RMap if one doesn't already exist and then uses that Agent to delete the DiSCO: rmap/webapp/src/main/java/info/rmapproject/webapp/service/RMapUpdateServiceImpl.java Lines 64 to 70 in be5a424
The description provided goes into RMapEvent.description |
Deletion and tombstone Events against a DiSCO only affect the target DiSCO version. Other versions in the lineage maintain their current status.
DiscosSolrOperations.deleteDocumentsForLineage(String lineageUri)
appears to delete all DiSCOs in a lineage when a DiSCO deletion occurs, To match RMap's behavior, it should only act on the DiSCO version that is the target of the deletion or tombstone Event. Here is an example to illustrate how statuses can change within a lineage:The text was updated successfully, but these errors were encountered: