Implement write batching

Also fix possible race condition which could in theory lead to "command out of sync"
and a buffer overflow that could happen on incorrect server response.
This commit is contained in:
Vitaliy Filippov
2020-10-20 03:29:17 +03:00
parent 7cb561f95a
commit d1645551d4
4 changed files with 118 additions and 83 deletions
-9
View File
@@ -288,16 +288,7 @@ void osd_messenger_t::cancel_osd_ops(osd_client_t *cl)
cancel_op(p.second);
}
cl->sent_ops.clear();
for (auto op: cl->outbox)
{
cancel_op(op);
}
cl->outbox.clear();
if (cl->write_op)
{
cancel_op(cl->write_op);
cl->write_op = NULL;
}
}
void osd_messenger_t::cancel_op(osd_op_t *op)