]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: force read bit for watch 3281/head
authorSage Weil <sage@redhat.com>
Tue, 30 Dec 2014 20:27:29 +0000 (12:27 -0800)
committerSage Weil <sage@redhat.com>
Tue, 30 Dec 2014 20:27:37 +0000 (12:27 -0800)
commit1265603b01af6522b362b54bb702116931471876
tree1e6f6377e51f8ba9e3884ecdda0c09620b198d9f
parent46424419ca89bf1d599e2a2abf5c6959c30c58f1
osd: force read bit for watch

We can get an bad reply like this:

     - watch1 received, repop started
     - con resets
     - watch2 received
     - watch2 sees watch in oi
       - replies immediately
       - does side-effects (connects new session/con)
     - watch1 repop completes
       - replies (dropped)
       - does side-effects (connects old session/con)

Two problems: we end up with the wrong session/con connected, and the watch
reply goes out before the watch is actually stable on disk.

Fix this my marking watch ops as reads.  This will make us wait for the
previous watch addition to commit before we process the next one.  Somewhat
overkill, but sufficient.

Fixes: #10441
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc