summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Flores <lflores@redhat.com>2024-02-16 17:23:21 +0100
committerGitHub <noreply@github.com>2024-02-16 17:23:21 +0100
commitaf013c6d7554b2dca2c0ec9de06d775827ac4853 (patch)
tree52567d6d19f66a9c542170fa598ebb6c8793b2ec
parentMerge pull request #55602 from ceph/wip-yuriw-add-squid-main (diff)
parentosd: always send returnvec-on-errors for client's retry (diff)
downloadceph-af013c6d7554b2dca2c0ec9de06d775827ac4853.tar.xz
ceph-af013c6d7554b2dca2c0ec9de06d775827ac4853.zip
Merge pull request #55570 from rzarzynski/wip-bug-64192
osd: always send returnvec-on-errors for client's retry
-rw-r--r--src/osd/PrimaryLogPG.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc
index 37b6442f797..a6922756236 100644
--- a/src/osd/PrimaryLogPG.cc
+++ b/src/osd/PrimaryLogPG.cc
@@ -4288,8 +4288,11 @@ void PrimaryLogPG::execute_ctx(OpContext *ctx)
}
reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);
// append to pg log for dup detection - don't save buffers for now
- record_write_error(op, soid, reply, result,
- ctx->op->allows_returnvec() ? ctx : nullptr);
+ // store op's returnvec unconditionally-on-errors to ensure coherency
+ // with the original request handling (see `ignore_out_data` above).
+ record_write_error(
+ op, soid, reply, result,
+ (ctx->op->allows_returnvec() || result < 0) ? ctx : nullptr);
close_op_ctx(ctx);
return;
}