]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: watch_flush() on shutdown
authorSage Weil <sage@redhat.com>
Fri, 19 Dec 2014 19:50:38 +0000 (11:50 -0800)
committerSage Weil <sage@redhat.com>
Sat, 20 Dec 2014 20:12:33 +0000 (12:12 -0800)
Users can easily forget this. It makes shutdown potentially block, but if
they have racing callbacks they get what they ask for.

Signed-off-by: Sage Weil <sage@redhat.com>
src/librados/RadosClient.cc

index c2986fb4332cc9f9166078ea7f7f2d385ca19205..a5b89a07960bb8be21e67ca120870d0c2a100c8b 100644 (file)
@@ -282,6 +282,9 @@ int librados::RadosClient::connect()
 
 void librados::RadosClient::shutdown()
 {
+  // make sure watch callbacks are flushed
+  watch_flush();
+
   lock.Lock();
   if (state == DISCONNECTED) {
     lock.Unlock();