From 55ed28e9d05d246970d76d4d35183ff06b4bb222 Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Sun, 10 May 2026 00:47:09 +0800 Subject: [PATCH 1/2] Enable ChainBuild with dynamic default branch detection Signed-off-by: Xiaoxi Chen --- .github/workflows/merge_build.yml | 47 ++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/merge_build.yml b/.github/workflows/merge_build.yml index 5f4fc008f..681bf6b1d 100644 --- a/.github/workflows/merge_build.yml +++ b/.github/workflows/merge_build.yml @@ -36,16 +36,37 @@ jobs: malloc-impl: ${{ matrix.malloc-impl }} prerelease: ${{ matrix.prerelease }} tooling: ${{ matrix.tooling }} - # ChainBuild: - # runs-on: "ubuntu-22.04" - # steps: - # - name: Start HomeObject Build - # run: | - # curl -L \ - # -X POST \ - # -H "Accept: application/vnd.github+json" \ - # -H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}"\ - # -H "X-GitHub-Api-Version: 2022-11-28" \ - # https://api.github.com/repos/eBay/homeobject/actions/workflows/conan_build.yml/dispatches \ - # -d '{"ref":"main","inputs":{}}' - # if: ${{ github.ref == 'refs/heads/master' }} + ChainBuild: + needs: Build + runs-on: "ubuntu-24.04" + steps: + - name: Get HomeObject default branch + id: get-branch + run: | + set -euo pipefail + + DEFAULT_BRANCH=$(curl --fail --show-error --silent --location \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/eBay/homeobject \ + | jq -r '.default_branch') + + if [ -z "$DEFAULT_BRANCH" ] || [ "$DEFAULT_BRANCH" = "null" ]; then + echo "Failed to determine HomeObject default branch from GitHub API response" >&2 + exit 1 + fi + + echo "default_branch=$DEFAULT_BRANCH" >> "$GITHUB_OUTPUT" + echo "HomeObject default branch: $DEFAULT_BRANCH" + + - name: Start HomeObject Build + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/eBay/homeobject/actions/workflows/conan_build.yml/dispatches \ + -d '{"ref":"${{ steps.get-branch.outputs.default_branch }}","inputs":{}}' + if: ${{ github.ref == 'refs/heads/stable/v7.x' }} From ef9ab9d0c5a8061b59719f7cfbcf69ae0a64f60a Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Thu, 4 Jun 2026 03:40:30 -0700 Subject: [PATCH 2/2] SDSTOR-22330: Upgrade timer callbacks to run-once with exp_count logging Signed-off-by: Xiaoxi Chen --- conanfile.py | 4 +-- src/lib/checkpoint/cp_mgr.cpp | 14 ++++++++-- src/lib/common/resource_mgr.cpp | 3 ++- src/lib/logstore/log_dev.cpp | 5 +++- .../replication/service/raft_repl_service.cpp | 27 ++++++++++++++++--- 5 files changed, 43 insertions(+), 10 deletions(-) diff --git a/conanfile.py b/conanfile.py index 0d20a477d..87a52abba 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "7.5.9" + version = "7.5.10" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" @@ -52,7 +52,7 @@ def build_requirements(self): self.test_requires("gtest/[^1.17]") def requirements(self): - self.requires("iomgr/[^12.0]", transitive_headers=True) + self.requires("iomgr/[^12.0.3]", transitive_headers=True) self.requires("sisl/[^13.2]", transitive_headers=True) self.requires("nuraft_mesg/[^4.0]", transitive_headers=True) diff --git a/src/lib/checkpoint/cp_mgr.cpp b/src/lib/checkpoint/cp_mgr.cpp index a18b95b3f..ea09e0b4e 100644 --- a/src/lib/checkpoint/cp_mgr.cpp +++ b/src/lib/checkpoint/cp_mgr.cpp @@ -98,7 +98,12 @@ void CPManager::start_timer() { LOGINFO("cp timer is set to {} usec", usecs); iomanager.run_on_wait(m_timer_fiber, [this, usecs]() { m_cp_timer_hdl = iomanager.schedule_thread_timer(usecs * 1000, true /* recurring */, nullptr /* cookie */, - [this](void*) { trigger_cp_flush(false /* false */); }); + [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFO("cp timer expired {} times, running once", exp_count); + } + trigger_cp_flush(false /* false */); + }); }); } @@ -433,7 +438,12 @@ CPWatchdog::CPWatchdog(CPManager* cp_mgr) : LOGINFO("CP watchdog timer setting to : {} seconds", m_timer_sec); m_timer_hdl = iomanager.schedule_global_timer(m_timer_sec * 1000 * 1000 * 1000, true, nullptr, iomgr::reactor_regex::all_user, - [this](void* cookie) { cp_watchdog_timer(); }); + [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFO("cp watchdog timer expired {} times, running once", exp_count); + } + cp_watchdog_timer(); + }); } void CPWatchdog::reset_cp() { diff --git a/src/lib/common/resource_mgr.cpp b/src/lib/common/resource_mgr.cpp index 10f7f611e..013efe71a 100644 --- a/src/lib/common/resource_mgr.cpp +++ b/src/lib/common/resource_mgr.cpp @@ -87,7 +87,8 @@ void ResourceMgr::start_timer() { m_res_audit_timer_hdl = iomanager.schedule_global_timer( res_mgr_timer_ms * 1000 * 1000, true /* recurring */, nullptr /* cookie */, iomgr::reactor_regex::all_worker, - [this](void*) { + [this](void*, uint64_t exp_count) { + if (exp_count > 1) { LOGINFO("resource audit timer expired {} times, running once", exp_count); } // all resource timely audit routine should arrive here; this->trigger_truncate(); }, diff --git a/src/lib/logstore/log_dev.cpp b/src/lib/logstore/log_dev.cpp index 5a627e645..60d269509 100644 --- a/src/lib/logstore/log_dev.cpp +++ b/src/lib/logstore/log_dev.cpp @@ -188,7 +188,10 @@ void LogDev::start_timer() { iomanager.run_on_wait(logstore_service().flush_thread(), [this]() { m_flush_timer_hdl = iomanager.schedule_thread_timer( HS_DYNAMIC_CONFIG(logstore.flush_timer_frequency_us) * 1000, true /* recurring */, nullptr /* cookie */, - [this](void*) { flush_if_necessary(); }); + [this](void*, uint64_t exp_count) { + if (exp_count > 1) { LOGINFO("log flush timer expired {} times, running once", exp_count); } + flush_if_necessary(); + }); }); } diff --git a/src/lib/replication/service/raft_repl_service.cpp b/src/lib/replication/service/raft_repl_service.cpp index 5a81b873c..f59c77d3e 100644 --- a/src/lib/replication/service/raft_repl_service.cpp +++ b/src/lib/replication/service/raft_repl_service.cpp @@ -636,7 +636,10 @@ void RaftReplService::start_repl_service_timers() { HS_DYNAMIC_CONFIG(generic.repl_dev_cleanup_interval_sec)); m_rdev_gc_timer_hdl = iomanager.schedule_thread_timer( HS_DYNAMIC_CONFIG(generic.repl_dev_cleanup_interval_sec) * 1000 * 1000 * 1000, true /* recurring */, - nullptr, [this](void *) { + nullptr, [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFOMOD(replication, "Reaper Thread: GC timer expired {} times, running once", exp_count); + } LOGDEBUGMOD(replication, "Reaper Thread: Doing GC"); gc_repl_reqs(); gc_repl_devs(); @@ -646,17 +649,33 @@ void RaftReplService::start_repl_service_timers() { uint64_t interval_ns = std::min( HS_DYNAMIC_CONFIG(consensus.wait_data_write_timer_ms) * 1000 * 1000, 1ul * 1000 * 1000 * 1000); m_rdev_fetch_timer_hdl = iomanager.schedule_thread_timer(interval_ns, true /* recurring */, nullptr, - [this](void *) { fetch_pending_data(); }); + [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFOMOD(replication, + "fetch pending data timer expired {} times, running once", + exp_count); + } + fetch_pending_data(); + }); // Flush durable commit lsns to superblock // FIXUP: what is the best value for flush_durable_commit_interval_ms? m_flush_durable_commit_timer_hdl = iomanager.schedule_thread_timer( HS_DYNAMIC_CONFIG(consensus.flush_durable_commit_interval_ms) * 1000 * 1000, true /* recurring */, - nullptr, [this](void *) { flush_durable_commit_lsn(); }); + nullptr, [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFOMOD(replication, "flush durable commit timer expired {} times, running once", exp_count); + } + flush_durable_commit_lsn(); + }); m_replace_member_sync_check_timer_hdl = iomanager.schedule_thread_timer( HS_DYNAMIC_CONFIG(consensus.replace_member_sync_check_interval_ms) * 1000 * 1000, true /* recurring */, - nullptr, [this](void *) { + nullptr, [this](void*, uint64_t exp_count) { + if (exp_count > 1) { + LOGINFOMOD(replication, + "replace member sync check timer expired {} times, running once", exp_count); + } monitor_replace_member_replication_status(); }); latch.count_down();