Fix client op retry timeout - do not retry immediately

Vitaliy Filippov 2024-04-07 18:45:46 +03:00
parent 3b84dcaedd
commit 17f61ddd96
1 changed files with 3 additions and 3 deletions

View File

@ -1209,7 +1209,7 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part)
// Set op->retry_after to retry operation after a short pause (not immediately)
if (!op->retry_after)
{
op->retry_after = op->retval == -EIO ? client_eio_retry_interval : client_retry_interval;
op->retry_after = op->retval != -EPIPE ? client_eio_retry_interval : client_retry_interval;
}
reset_retry_timer(op->retry_after);
if (stop_fd >= 0)
@ -1217,7 +1217,7 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part)
msgr.stop_client(stop_fd);
}
op->inflight_count--;
if (op->inflight_count == 0)
if (op->inflight_count == 0 && !op->retry_after)
{
if (op->opcode == OSD_OP_SYNC)
continue_sync(op);
@ -1242,7 +1242,7 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part)
{
op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0;
}
if (op->inflight_count == 0)
if (op->inflight_count == 0 && !op->retry_after)
{
if (op->opcode == OSD_OP_SYNC)
continue_sync(op);