From 5cf1157f1629bf00d54ea2ec94d9b5ee4c37a92b Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 1 Aug 2021 20:05:19 +0300 Subject: [PATCH] Return real version on CAS failure --- src/osd_primary.cpp | 1 + src/osd_primary_write.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/osd_primary.cpp b/src/osd_primary.cpp index 91fe9c08..0a43a087 100644 --- a/src/osd_primary.cpp +++ b/src/osd_primary.cpp @@ -353,6 +353,7 @@ resume_3: if (cur_op->req.rw.version && op_data->fact_ver != (cur_op->req.rw.version-1)) { cur_op->reply.hdr.retval = -EINTR; + cur_op->reply.rw.version = op_data->fact_ver; goto continue_others; } // Save version override for parallel reads diff --git a/src/osd_primary_write.cpp b/src/osd_primary_write.cpp index 386d3af6..ad111d4e 100644 --- a/src/osd_primary_write.cpp +++ b/src/osd_primary_write.cpp @@ -100,6 +100,7 @@ resume_3: if (cur_op->req.rw.version && op_data->fact_ver != (cur_op->req.rw.version-1)) { cur_op->reply.hdr.retval = -EINTR; + cur_op->reply.rw.version = op_data->fact_ver; goto continue_others; } if (op_data->scheme == POOL_SCHEME_REPLICATED) @@ -260,6 +261,7 @@ resume_9: } } cur_op->reply.hdr.retval = cur_op->req.rw.len; + cur_op->reply.rw.version = op_data->fact_ver; continue_others: osd_op_t *next_op = NULL; auto next_it = pg.write_queue.find(op_data->oid);