]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Asio deprecations
authorAdam Emerson <aemerson@redhat.com>
Fri, 13 Dec 2024 20:22:12 +0000 (15:22 -0500)
committerAdam Emerson <aemerson@redhat.com>
Mon, 10 Feb 2025 20:19:10 +0000 (15:19 -0500)
Signed-off-by: Adam Emerson <aemerson@redhat.com>
src/rgw/driver/rados/rgw_notify.cc

index 5734284d1a364c93c523ce1e68116964aae9c240..14eeb73dac26b559ca4c50a34f45fa121416ebbb 100644 (file)
@@ -178,7 +178,7 @@ private:
       if (pending_tokens == 0) {
         return;
       }
-      timer.expires_from_now(infinite_duration);
+      timer.expires_after(infinite_duration);
       boost::system::error_code ec; 
       timer.async_wait(yield[ec]);
       ceph_assert(ec == boost::system::errc::operation_canceled);
@@ -297,7 +297,7 @@ private:
           << ". error: " << ret << dendl;
       }
       Timer timer(io_context);
-      timer.expires_from_now(std::chrono::seconds(reservations_cleanup_period_s));
+      timer.expires_after(std::chrono::seconds(reservations_cleanup_period_s));
       boost::system::error_code ec;
            timer.async_wait(yield[ec]);
     }
@@ -380,7 +380,7 @@ private:
       // if queue was empty the last time, sleep for idle timeout
       if (is_idle) {
         Timer timer(io_context);
-        timer.expires_from_now(std::chrono::microseconds(queue_idle_sleep_us));
+        timer.expires_after(std::chrono::microseconds(queue_idle_sleep_us));
         boost::system::error_code ec;
              timer.async_wait(yield[ec]);
       }
@@ -657,7 +657,7 @@ private:
       const auto duration = (has_error ? 
         std::chrono::milliseconds(queues_update_retry_ms) : std::chrono::milliseconds(queues_update_period_ms)) + 
         std::chrono::milliseconds(duration_jitter(rnd_gen));
-      timer.expires_from_now(duration);
+      timer.expires_after(duration);
       const auto tp = ceph::coarse_real_time::clock::to_time_t(ceph::coarse_real_time::clock::now() + duration);
       ldpp_dout(this, 20) << "INFO: next queues processing will happen at: " << std::ctime(&tp)  << dendl;
       boost::system::error_code ec;
@@ -743,7 +743,7 @@ private:
     Timer timer(io_context);
     while (processed_queue_count > 0) {
       ldpp_dout(this, 5) << "INFO: manager stopped. " << processed_queue_count << " queues are still being processed" << dendl;
-      timer.expires_from_now(std::chrono::milliseconds(queues_update_retry_ms));
+      timer.expires_after(std::chrono::milliseconds(queues_update_retry_ms));
       boost::system::error_code ec;
       timer.async_wait(yield[ec]);
     }