chore: remove DbSlice mutex and add ConditionFlag in SliceSnapshot (#4073)

* remove DbSlice mutex
* add ConditionFlag in SliceSnapshot
* disable compression when big value serialization is on
* add metrics

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2024-12-05 12:24:23 +01:00 committed by GitHub
parent 7ccad66fb1
commit 267d5ab370
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 185 additions and 119 deletions

View file

@ -27,7 +27,7 @@ ServerState::Stats::Stats(unsigned num_shards) : tx_width_freq_arr(num_shards) {
}
ServerState::Stats& ServerState::Stats::Add(const ServerState::Stats& other) {
static_assert(sizeof(Stats) == 17 * 8, "Stats size mismatch");
static_assert(sizeof(Stats) == 18 * 8, "Stats size mismatch");
#define ADD(x) this->x += (other.x)
@ -49,6 +49,9 @@ ServerState::Stats& ServerState::Stats::Add(const ServerState::Stats& other) {
ADD(blocked_on_interpreter);
ADD(rdb_save_usec);
ADD(rdb_save_count);
ADD(big_value_preemptions);
ADD(oom_error_cmd_cnt);
if (this->tx_width_freq_arr.size() > 0) {