]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/ReplicatedPG: initial agent to random hash position inside pg
authorSage Weil <sage@inktank.com>
Tue, 28 Jan 2014 00:26:19 +0000 (16:26 -0800)
committerSage Weil <sage@inktank.com>
Sun, 16 Feb 2014 06:09:38 +0000 (22:09 -0800)
commit3bc31272db218faa3a381836b29f677e15be6746
treedf26af9ab1b304a9c58ee16c56fd6e7a0dff7873
parentf6930452bcc41bea8d6b0da35f6c19dd56021225
osd/ReplicatedPG: initial agent to random hash position inside pg

When the agent starts, start at a random offset to ensure we get a more
uniform distribution of attention to all objects in the PG.  Otherwise, we
will disproportionately examine objects at the "beginning" of the PG if we
are interrupted by peering or restarts or some other activity.

Note that if the agent_state is preserved, we do not forget our position,
which is also nice.

We *could* persist this position in the pg_info_t somewhere, but I am not
sure it is worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc