Postpone cb() to set_immediate() to prevent stack overflows in kv_db

This commit is contained in:
Vitaliy Filippov
2025-05-03 15:06:59 +03:00
parent 80c4e8c20f
commit 2d07449e74
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -86,8 +86,8 @@ class cluster_client_t
#ifdef __MOCK__
public:
#endif
timerfd_manager_t *tfd;
ring_loop_t *ringloop;
timerfd_manager_t *tfd = NULL;
ring_loop_t *ringloop = NULL;
std::map<pool_id_t, uint64_t> pg_counts;
std::map<pool_pg_num_t, osd_num_t> pg_primary;
+1 -1
View File
@@ -870,7 +870,7 @@ static void get_block(kv_db_t *db, uint64_t offset, int cur_level, int recheck_p
}
// Block already in cache, we can proceed
blk->usage = db->usage_counter;
cb(0, BLK_UPDATING);
db->cli->msgr.ringloop->set_immediate([=] { cb(0, BLK_UPDATING); });
return;
}
cluster_op_t *op = new cluster_op_t;