]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async/Event: remove global_centers assert
authorHaomai Wang <haomai@xsky.com>
Fri, 15 Jul 2016 07:20:10 +0000 (15:20 +0800)
committerHaomai Wang <haomai@xsky.com>
Tue, 16 Aug 2016 15:19:25 +0000 (23:19 +0800)
In tests we allow to reset EventCenter instance in the same CephContext,
so it may let global_centers->centers to set the same position multi times.

Signed-off-by: Haomai Wang <haomai@xsky.com>
src/msg/async/Event.cc

index 0b31b1eb3caf91425ead36ef3fe96dd8f0b66cf8..1582dc5a16b34e955597eea20faf67c3db6ca00c 100644 (file)
@@ -140,7 +140,7 @@ void EventCenter::set_owner()
   if (!global_centers) {
     cct->lookup_or_create_singleton_object<EventCenter::AssociatedCenters>(
         global_centers, "AsyncMessenger::EventCenter::global_center");
-    assert(global_centers && !global_centers->centers[idx]);
+    assert(global_centers);
     global_centers->centers[idx] = this;
     notify_handler = new C_handle_notify(this, cct);
     int r = create_file_event(notify_receive_fd, EVENT_READABLE, notify_handler);