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
DM-31941: Allow datastore.trash to remove unknown files and ingest to overwrite #578
Conversation
0dac861
to
b6ca422
Compare
Codecov Report
@@ Coverage Diff @@
## master #578 +/- ##
==========================================
+ Coverage 83.54% 83.60% +0.05%
==========================================
Files 242 242
Lines 30197 30306 +109
Branches 4493 4507 +14
==========================================
+ Hits 25229 25337 +108
- Misses 3780 3782 +2
+ Partials 1188 1187 -1
Continue to review full report at Codecov.
|
b6ca422
to
5ab5bc5
Compare
@andy-slac I updated the trash commit to add some test coverage by turning on trust mode. |
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.
Looks good, couple of nitpick comments.
This matches datastore.put behavior and trusts that the registry would not be asking for an overwrite unless it had good reason to do so.
If you asked to delete two rows it would double up every row that did not match. The "else" was indented the wrong amount.
This allows some areas to be tested that use set()
datastore.trash() is optimized to scan the records table and quickly move those records to the trash table for later deletion. For execution mode the files might be there but the records won't be. Therefore, to allow consistency for dataset pruning, when trust mode is enabled the file system is examined and files removed if they are present even if there are no records.
5ab5bc5
to
fb328a3
Compare
Checklist
doc/changes