]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: flush datalog entries on shutdown
authorCasey Bodley <cbodley@redhat.com>
Wed, 5 Feb 2020 17:47:01 +0000 (12:47 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 5 Feb 2020 17:56:18 +0000 (12:56 -0500)
pending datalog entries need to be issued before shutdown. a race with
sshutdown is especially easy to reproduce with radosgw-admin, ie for
'bucket sync enable/disable'

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_bucket.cc

index 5f37624333330c367ebb10eb9de7407d30a78422..630c0aadf60affd92eec910ff14d008e87a2a42b 100644 (file)
@@ -2398,7 +2398,7 @@ RGWDataChangesLog::~RGWDataChangesLog() {
 }
 
 void *RGWDataChangesLog::ChangesRenewThread::entry() {
-  do {
+  for (;;) {
     dout(2) << "RGWDataChangesLog::ChangesRenewThread: start" << dendl;
     int r = log->renew_entries();
     if (r < 0) {
@@ -2411,7 +2411,7 @@ void *RGWDataChangesLog::ChangesRenewThread::entry() {
     int interval = cct->_conf->rgw_data_log_window * 3 / 4;
     std::unique_lock locker{lock};
     cond.wait_for(locker, std::chrono::seconds(interval));
-  } while (!log->going_down());
+  }
 
   return NULL;
 }