Fix CAS retries during snapshot merge
This commit is contained in:
+2
-2
@@ -533,7 +533,7 @@ struct snap_merger_t
|
|||||||
if (use_cas && subop->retval == -EINTR)
|
if (use_cas && subop->retval == -EINTR)
|
||||||
{
|
{
|
||||||
// CAS failure - reread and repeat optimistically
|
// CAS failure - reread and repeat optimistically
|
||||||
rwo->start = subop->offset - rwo->offset;
|
rwo->start = rwo->end = 0;
|
||||||
rwo_read(rwo);
|
rwo_read(rwo);
|
||||||
delete subop;
|
delete subop;
|
||||||
return;
|
return;
|
||||||
@@ -543,7 +543,7 @@ struct snap_merger_t
|
|||||||
rwo->error_read = false;
|
rwo->error_read = false;
|
||||||
}
|
}
|
||||||
// Increment CAS version
|
// Increment CAS version
|
||||||
rwo->op.version++;
|
rwo->op.version = subop->version;
|
||||||
if (use_cas)
|
if (use_cas)
|
||||||
next_write(rwo);
|
next_write(rwo);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1209,6 +1209,10 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part)
|
|||||||
copy_part_bitmap(op, part);
|
copy_part_bitmap(op, part);
|
||||||
op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0;
|
op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0;
|
||||||
}
|
}
|
||||||
|
else if (op->opcode == OSD_OP_WRITE)
|
||||||
|
{
|
||||||
|
op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0;
|
||||||
|
}
|
||||||
if (op->inflight_count == 0)
|
if (op->inflight_count == 0)
|
||||||
{
|
{
|
||||||
if (op->opcode == OSD_OP_SYNC)
|
if (op->opcode == OSD_OP_SYNC)
|
||||||
|
|||||||
Reference in New Issue
Block a user