]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: Fix bad assert in ~ObjectCacher.
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 9 Nov 2010 18:48:00 +0000 (10:48 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 10 Nov 2010 16:13:28 +0000 (08:13 -0800)
The objects data member is never empty on shutdown since it now consists
of a vector of pools. Instead, check each pool map for emptiness.

src/osdc/ObjectCacher.h

index 2e10b487f47f13a9cf63faae3b3b79d5da8130c8..052948acdecc65f5fb1587db6fa7ce7330caf717 100644 (file)
@@ -537,7 +537,10 @@ class ObjectCacher {
   }
   ~ObjectCacher() {
     // we should be empty.
-    assert(objects.empty());
+    for (vector<hash_map<sobject_t, Object *> >::iterator i = objects.begin();
+        i != objects.end();
+        ++i)
+      assert(!i->size());
     assert(lru_rest.lru_get_size() == 0);
     assert(lru_dirty.lru_get_size() == 0);
     assert(dirty_bh.empty());