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

Considerations for DbCleanup #68

Open
danielplohmann opened this issue Mar 6, 2024 · 1 comment
Open

Considerations for DbCleanup #68

danielplohmann opened this issue Mar 6, 2024 · 1 comment

Comments

@danielplohmann
Copy link
Owner

  • think of orphan query samples and functions that don't have a job connected to them
  • think of doing a DB compact afterwards
@yankovs
Copy link
Contributor

yankovs commented Mar 19, 2024

Hey!

I also want to add about failed query jobs. In the doDbCleanup, in this section:

mcrit/mcrit/Worker.py

Lines 190 to 192 in 765195b

unmapped_finished = self.getQueueData(0, 0, method="getMatchesForUnmappedBinary", state="finished")
mapped_finished = self.getQueueData(0, 0, method="getMatchesForMappedBinary", state="finished")
smda_finished = self.getQueueData(0, 0, method="getMatchesForSmdaReport", state="finished")
it should also get the query jobs that have failed status. It should then delete those failed queries

Regarding DB compact, in the MongoDbStorage class we can have a method that runs:

db.runCommand({ compact: "query_samples" })
db.runCommand({ compact: "query_functions" })

and have it run at the end of doDbCleanup

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

No branches or pull requests

2 participants