Skip to content

Commit 47298fa

Browse files
authored
Merge pull request ceph#62805 from Matan-B/wip-matanb-rep-read-perfcount
osd/PrimaryLogPG: Relax replicated reads when recovering Reviewed-by: Samuel Just <[email protected]>
2 parents 9db8e84 + 4ff38bd commit 47298fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/osd/PrimaryLogPG.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,9 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
21952195

21962196
// missing object?
21972197
if (is_unreadable_object(head)) {
2198-
if (!is_primary()) {
2198+
if (!is_primary() && is_missing_any_head_or_clone_of(head)) {
2199+
dout(10) << __func__ << "possibly missing clone object " << head
2200+
<< " on this replica, bouncing to primary" << dendl;
21992201
osd->logger->inc(l_osd_replica_read_redirect_missing);
22002202
osd->reply_op_error(op, -EAGAIN);
22012203
return;

src/osd/PrimaryLogPG.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,9 @@ class PrimaryLogPG : public PG,
18921892
!recovery_state.get_missing_loc().readable_with_acting(
18931893
oid, get_actingset());
18941894
}
1895+
bool is_missing_any_head_or_clone_of(const hobject_t &hoid) {
1896+
return recovery_state.is_missing_any_head_or_clone_of(hoid);
1897+
}
18951898
void maybe_kick_recovery(const hobject_t &soid);
18961899
void wait_for_unreadable_object(const hobject_t& oid, OpRequestRef op);
18971900
void finish_unreadable_object(const hobject_t oid);

0 commit comments

Comments
 (0)