objecter: optionally read from replicas
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.)
#2 Updated by Colin McCabe almost 10 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
+ 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.