feat: add statistics initialization to the API
Though we can lazily initialize statistics spaces, there is still a problem with read-only replicas. If the workload does not write to the storage (only reads with SELECTs), then callbre is used and no queries will be dispatched to the storage master. As a result, no statistics spaces will be initialized on the storage failover group. To deal with it, we add a new API method to initialize statistics on the instance startup.
Showing
- sbroad-cartridge/src/api.rs 1 addition, 0 deletionssbroad-cartridge/src/api.rs
- sbroad-cartridge/src/api/statistics.rs 21 additions, 0 deletionssbroad-cartridge/src/api/statistics.rs
- sbroad-cartridge/src/router.lua 7 additions, 0 deletionssbroad-cartridge/src/router.lua
- sbroad-cartridge/src/storage.lua 7 additions, 0 deletionssbroad-cartridge/src/storage.lua
- sbroad-core/src/otm/statistics/table.rs 3 additions, 3 deletionssbroad-core/src/otm/statistics/table.rs
sbroad-cartridge/src/api/statistics.rs
0 → 100644
Please register or sign in to comment