summaryrefslogtreecommitdiff
path: root/sys-cluster/ceph/files/ceph-19.2.1-rgw.patch
blob: 7a05bb0b0621608bf5278de5ab26d6853101e222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From b2e76314cf0f4be311a9df60bdc0ab4eef83e120 Mon Sep 17 00:00:00 2001
From: Adam Emerson <aemerson@redhat.com>
Date: Fri, 13 Dec 2024 15:22:12 -0500
Subject: [PATCH] rgw: Asio deprecations

Signed-off-by: Adam Emerson <aemerson@redhat.com>
---
 src/rgw/driver/rados/rgw_notify.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc
index 5734284d1a364..14eeb73dac26b 100644
--- a/src/rgw/driver/rados/rgw_notify.cc
+++ b/src/rgw/driver/rados/rgw_notify.cc
@@ -178,7 +178,7 @@ class Manager : public DoutPrefixProvider {
       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 @@ class Manager : public DoutPrefixProvider {
           << ". 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 @@ class Manager : public DoutPrefixProvider {
       // 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 @@ class Manager : public DoutPrefixProvider {
       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 @@ class Manager : public DoutPrefixProvider {
     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]);
     }