Postpone cb() to set_immediate() to prevent stack overflows in kv_db
This commit is contained in:
@@ -86,8 +86,8 @@ class cluster_client_t
|
|||||||
#ifdef __MOCK__
|
#ifdef __MOCK__
|
||||||
public:
|
public:
|
||||||
#endif
|
#endif
|
||||||
timerfd_manager_t *tfd;
|
timerfd_manager_t *tfd = NULL;
|
||||||
ring_loop_t *ringloop;
|
ring_loop_t *ringloop = NULL;
|
||||||
|
|
||||||
std::map<pool_id_t, uint64_t> pg_counts;
|
std::map<pool_id_t, uint64_t> pg_counts;
|
||||||
std::map<pool_pg_num_t, osd_num_t> pg_primary;
|
std::map<pool_pg_num_t, osd_num_t> pg_primary;
|
||||||
|
|||||||
+1
-1
@@ -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
|
// Block already in cache, we can proceed
|
||||||
blk->usage = db->usage_counter;
|
blk->usage = db->usage_counter;
|
||||||
cb(0, BLK_UPDATING);
|
db->cli->msgr.ringloop->set_immediate([=] { cb(0, BLK_UPDATING); });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cluster_op_t *op = new cluster_op_t;
|
cluster_op_t *op = new cluster_op_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user