-
Notifications
You must be signed in to change notification settings - Fork 460
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
Purge retired batches from the batch table #3148
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3148 +/- ##
=========================================
- Coverage 6.04% 6.04% -0.01%
=========================================
Files 36 36
Lines 5967 5972 +5
=========================================
Hits 361 361
- Misses 5606 5611 +5
|
@lfield - two questions for you. Question 1 Question 2 lib/common_defs.h says:
The explanation below BATCH_STATE_RETIRED implies that once this state is reached - there are actions that should be taken. However, looking elsewhere, for example html/inc/submit_util.inc
It looks like the workunits are marked as assimilated first (so that they are processed for delete and purging). So it might be the case that it only reaches the BATCH_STATE_RETIRED state after all related workunits are assimilated. Is the comment in lib/common_defs.h misleading? I.e should it state that BATCH_STATE_RETIRED means that all workunits are assimilated and will be deleted and purged? Or should there be a new state BATCH_STATE_READY_TO_PURGE? Let me know your perspective NOTE: WCG does not use the batch table, so I apologize if I misunderstand. |
The meaning of "retired" can vary between projects, But that's just one use case. Other projects might want to have completed |
Archiving results might be a good idea for projects that want to keep track of how many batches a user submitted. That might be needed for some kind of accounting system. Whether it is to bill the user or just create a diagram at the end of the year that shows the usage fractions per user or per batch. |
Our use of the batch table is limited. An automated tool is submitting the jobs and we have one work unit per batch. @TheAspens For question 2, I don't see a contradiction. In common_defs.h, BATCH_STATE_RETIRED means this is not required anymore so the files and db records can be deleted. In submit_util.inc the work units are set to ASSIMILATE_DONE so that they can be deleted. |
@lfield - I can agree with that being a feature that can be added later as needed. All my questions are answered. I've updated the documentation page here: https://boinc.berkeley.edu/trac/wiki/DbPurge |
Fixes #3005
The change adds the option --batches to delete all retired batches from the batch table. It is an alternative implementation to #3101 which does this in a separate php script.