]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc/Objecter: distinguish between multiple notify completions 6336/head
authorSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 18:50:34 +0000 (14:50 -0400)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Wed, 21 Oct 2015 12:06:29 +0000 (17:36 +0530)
commit7ffd072a8cc7e114d4d674d30333fea4db04dcdd
tree65757caaa48718f09806473bb1bccb997561b743
parent647c91098e8517912c73e3f7d27954e6f340472c
osdc/Objecter: distinguish between multiple notify completions

We may send a notify to the cluster multiple times due to OSDMap
changes.  In some cases, earlier notify attempts may complete with
an error, while later attempts succeed.  We need to only pay
attention to the most-recently send notify's completion.

Do this by making note of the notify_id in the initial ACK (only
present when talking to newer OSDs).  When we get a notify
completion, match it against our expected notify_id (if we have
one) or else discard it.

This is important because in some cases an early notify completion
may be an error while a later one succeeds.

Note that if we are talking to an old cluster we will simply not record a
notify_id and our behavior will be the same as before (we will trust any
notify completion we get).

Fixes: #13114
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e86d033854c76f344c678e92016c4e5c5e0385e2)

Conflicts:
src/osdc/Objecter.cc
In Objecter::handle_watch_notify, a conflict was there due to a modified comment by commit 47277c51db7bb2725ea117e4e8834869ae93e006, which was not backported
src/osdc/Objecter.cc
src/osdc/Objecter.h