]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: take heartbeat_lock before checking for session
authorSage Weil <sage@redhat.com>
Fri, 26 Oct 2018 15:39:28 +0000 (10:39 -0500)
committerSage Weil <sage@redhat.com>
Fri, 26 Oct 2018 15:39:28 +0000 (10:39 -0500)
commit51d8e2457d73c709bfa4f706793696b3ce704ff9
tree3eeab62d730aeba395d6759eedc83538f19b6ee1
parent375091f9f9f0dbf36e31ff8afe56af170353749d
osd: take heartbeat_lock before checking for session

When we open a connection, there is a short window before we attach
the session.  If a fault happens quickly, we won't get the reset, and
will persistently fail to send osd pings.

Move the lock up to avoid this.  Note that we should rarely really see
connections without sessions here anyway (except when this specific
race happens), so this should have no negative impact (by taking the lock
when we weren't before).

Fixes: http://tracker.ceph.com/issues/36602
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc