Protect DB from summarizing large queue from many tape servers at once
Currently we are using table views which are simply saved queries executed anytime we want information from such a view.
-
Postgres offers materialised views, which we need to refresh regularly (every ~30sec might work just fine for most of our use cases),like that we would avoid overloading the DB deployment by
COUNT(*)
statements from many tape servers at the same time. -
Another option is to implement our own counters (count pop and count insert and make a difference).
-
The last option is to lock the simple view to avoid the select statements would be performed in parallel from more than 1 tape server at a time.
Option 1) would be dangerous for starting two mounts for the same workload while only 1 might be needed - interferes with the scheduling decisions depending on the delay we wait for the refresh
Option 2) most up to date, DB protected, we would just have to implement some automatic xcheck mechanism time to time to avoid that in cas eof system crashes we would haev inconsistent summaries
Option 3) best from the 2 above for now, we implemented this for now