From ed94aa52cf72512c1d2fbc3538c0dd07bdde2085 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 27 Oct 2025 20:19:17 +0300 Subject: [PATCH] Ensure that the retry timer is set when checking PG retry (for #99) --- src/client/cluster_client_list.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/cluster_client_list.cpp b/src/client/cluster_client_list.cpp index 3d4cd6f9..a6a73da4 100644 --- a/src/client/cluster_client_list.cpp +++ b/src/client/cluster_client_list.cpp @@ -31,7 +31,7 @@ struct inode_list_pg_t osd_num_t cur_primary = 0; int state = 0; int inflight_ops = 0; - timespec wait_until; + timespec wait_until = {}; std::vector list_osds; bool has_unstable = false; @@ -177,6 +177,9 @@ void cluster_client_t::retry_start_pg_listing(inode_list_pg_t *pg) if (tv.tv_sec < pg->wait_until.tv_sec || tv.tv_sec == pg->wait_until.tv_sec && tv.tv_nsec < pg->wait_until.tv_nsec) { + // Ensure that the retry timer is set + set_list_retry_timeout(pg->wait_until.tv_sec*1000 - tv.tv_sec*1000 + + (pg->wait_until.tv_nsec - tv.tv_nsec)/1000000, pg->wait_until); return; } }