Project

General

Profile

Actions

Feature #619

closed

objecter: optionally read from replicas

Added by Sage Weil over 13 years ago. Updated about 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Add a read flag to allow reads to come from a random replica. If a replica replies with EAGAIN, retry the request, but always on the primary. (This may happen if the replica is missing the object due to a recovery in progress.)


Related issues 2 (0 open2 closed)

Related to Ceph - Feature #618: osd: allow reads from replicasResolvedColin McCabe11/30/2010

Actions
Blocked by Ceph - Cleanup #650: objecter: refactor request tracking to be per-osd instead of per-pgResolvedSage Weil12/14/2010

Actions
Actions #1

Updated by Sage Weil over 13 years ago

  • Assignee set to Colin McCabe

see objecter_balance_reads branch for untested client-side implementation

Actions #2

Updated by Colin McCabe about 13 years ago

  • Status changed from New to Resolved

I ran test_rw.sh with the following patch:

diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
index 37a23fb..84afa9d 100644
--- a/src/osdc/Objecter.h
++ b/src/osdc/Objecter.h
@ -309,6 +309,7 @ public:
tid(0), attempts(0),
paused(false), objver(ov) {
ops.swap(op);
flags |= CEPH_OSD_FLAG_BALANCE_READS;
}
};

It succeeded when reading from the replicas.

One thing to note. If an object is unfound on the OSD we try to fetch it from, we block until it becomes found on that OSD. We do not ask other OSDs if they already have a copy of that same object. This is probably acceptable because eventually, we will eliminate all unfound items on the different replicas through PG recovery.

Actions #3

Updated by Colin McCabe about 13 years ago

Sigh. Reposting patch for clarity:

 --- a/src/osdc/Objecter.h
 +++ b/src/osdc/Objecter.h
 @@ -309,6 +309,7 @@ public:
        tid(0), attempts(0),
        paused(false), objver(ov) {
        ops.swap(op);
 +      flags |= CEPH_OSD_FLAG_BALANCE_READS;
     }
   };
Actions

Also available in: Atom PDF