Compare commits
2 Commits
36b341a96f
...
2defd7d8ed
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | 2defd7d8ed | |
Vitaliy Filippov | 7a55d59266 |
|
@ -197,7 +197,6 @@ struct kv_op_t
|
|||
|
||||
void exec();
|
||||
void next(); // for list
|
||||
~kv_op_t();
|
||||
protected:
|
||||
int recheck_policy = KV_RECHECK_LEAF;
|
||||
bool started = false;
|
||||
|
@ -1004,15 +1003,6 @@ void kv_op_t::exec()
|
|||
finish(-ENOSYS);
|
||||
}
|
||||
|
||||
kv_op_t::~kv_op_t()
|
||||
{
|
||||
if (started && !done)
|
||||
{
|
||||
done = true;
|
||||
db->active_ops--;
|
||||
}
|
||||
}
|
||||
|
||||
void kv_op_t::finish(int res)
|
||||
{
|
||||
auto db = this->db;
|
||||
|
@ -2068,5 +2058,10 @@ void kv_dbw_t::list_next(void *handle, std::function<void(int res, const std::st
|
|||
void kv_dbw_t::list_close(void *handle)
|
||||
{
|
||||
kv_op_t *op = (kv_op_t*)handle;
|
||||
if (op->started && !op->done)
|
||||
{
|
||||
op->done = true;
|
||||
op->db->active_ops--;
|
||||
}
|
||||
delete op;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue