]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados: fix race on osdmap initialization
authorJohn Spray <john.spray@redhat.com>
Thu, 14 Aug 2014 10:56:07 +0000 (11:56 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:18 +0000 (01:34 +0100)
commit52b0ddcfb9d836a1a1afe47abd0bf1bdd0fd4c8e
tree5949ab8057dbabb09cb08613b2ae7f4be230ea45
parent545baf858256db1b6e4064c82ab4c39841e135c4
librados: fix race on osdmap initialization

This would cause occasional failures where calls
to lookup_pool immediately after connect() would
fail to find any pool because the OSD map had not
yet been loaded.  The wait for the map was lost when
the pool name cache was lost in ce176b827.

To avoid similar issues, the pool_requires_alignment
and pool_required_alignment helpers need the same
wait_for_osdmap before proceeding.  Usually callers
would call lookup_pool before these guys but it's
not guaranteed.

Signed-off-by: John Spray <john.spray@redhat.com>
src/librados/RadosClient.cc