Skip to content

Commit 7ab0588

Browse files
committed
osd: During recovery, pass "for_recovery" when attempting re-reads
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 <[email protected]>
1 parent ce5d58d commit 7ab0588

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/osd/ECCommon.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ int ECCommon::ReadPipeline::send_all_remaining_reads(
615615
// reset the old shard reads, we are going to read them again.
616616
read_request.shard_reads.clear();
617617
return get_remaining_shards(hoid, rop.complete.at(hoid), read_request,
618-
rop.do_redundant_reads, want_attrs);
618+
rop.for_recovery, want_attrs);
619619
}
620620

621621
void ECCommon::ReadPipeline::kick_reads() {

0 commit comments

Comments
 (0)