Add a db_cleanup
routine that updates the cached CONFIG.products.num_of_runs
to the actual, sensible, value
#4199
Labels
Milestone
As of CodeChecker 6.23, the following nonsense can appear for long-running servers. The underlying reason is so far unclear, which makes it non-trivial to fix, but we could at least temporarily treat the symptoms at every server restart if a
db_cleanup
routine was added that updates the value cached in the CONFIG database underproducts.num_of_runs
to the real value ofCOUNT(runs.id)
in the PRODUCT database.Warning
In the post-#4171 world, care must be taken that this calculation and update can not be executed in parallel and must be sequenced after the per-product
db_cleanup
.Tip
We should also consider that this calculation could be updated not just every time a server restarts, but every time the details of a product are queried. In case we detect that there is a negative number of runs, we could defer to a "cold path" where the calculation of the actual number of runs is performed, and the database is updated. (While more expensive, the trade-off is that we will never actually give the user back a nonsense.)
The text was updated successfully, but these errors were encountered: