]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: During recovery, pass "for_recovery" when attempting re-reads
authorAlex Ainscow <aainscow@uk.ibm.com>
Fri, 23 May 2025 08:59:31 +0000 (09:59 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Tue, 1 Jul 2025 12:03:30 +0000 (13:03 +0100)
get_all_remaining_reads() is used for two purposes:

1. If a read unexpectedly fails, recover from other shards.
2. If a shard is missing, but is allowed to be missing (typically
   due to unequal shard sizes), we rely on this function to return
   no new reads, without an error.

The test failure we saw case (2), but I think case (1) is important.

Most of the time we probably would not notice, but if insufficient redundancy
exists without the for_recovery being set, then this will result in
recovery failing.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/ECCommon.cc

index da6e5b9e40897bbe320d0000c8720aaa4888bd98..22842479cdbbc13f4a9bb636604822f2d132c802 100644 (file)
@@ -615,7 +615,7 @@ int ECCommon::ReadPipeline::send_all_remaining_reads(
   // reset the old shard reads, we are going to read them again.
   read_request.shard_reads.clear();
   return get_remaining_shards(hoid, rop.complete.at(hoid), read_request,
-                              rop.do_redundant_reads, want_attrs);
+                              rop.for_recovery, want_attrs);
 }
 
 void ECCommon::ReadPipeline::kick_reads() {