From 4e90e752eb2505b72de97d10653a8f83bcb19912 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 10 Aug 2024 19:23:26 +0300 Subject: [PATCH] Fix merge/flatten into a pool with different object size --- src/client/cluster_client.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/cluster_client.cpp b/src/client/cluster_client.cpp index bedd5f55..f6e76721 100644 --- a/src/client/cluster_client.cpp +++ b/src/client/cluster_client.cpp @@ -1286,7 +1286,11 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part) if (op->opcode == OSD_OP_READ || op->opcode == OSD_OP_READ_BITMAP || op->opcode == OSD_OP_READ_CHAIN_BITMAP) { copy_part_bitmap(op, part); - op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0; + if (op->inode == op->cur_inode) + { + // Read only returns the version of the uppermost layer + op->version = op->parts.size() == 1 ? part->op.reply.rw.version : 0; + } } else if (op->opcode == OSD_OP_WRITE) {