From 3cfdc96dae097ed8186f9e9beffa04d0f9468f18 Mon Sep 17 00:00:00 2001 From: Gil Levkovich Date: Thu, 16 Jun 2022 13:24:59 +0300 Subject: [PATCH 1/2] BCStateTran: fix wrong state of is_fetching_ metrics is_fetching_ should show 1 only if current replica is an active dest. The way code written now, set to 1 also when current replica is an active source. --- bftengine/src/bcstatetransfer/BCStateTran.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bftengine/src/bcstatetransfer/BCStateTran.cpp b/bftengine/src/bcstatetransfer/BCStateTran.cpp index 074024860b..673480565f 100644 --- a/bftengine/src/bcstatetransfer/BCStateTran.cpp +++ b/bftengine/src/bcstatetransfer/BCStateTran.cpp @@ -330,7 +330,7 @@ BCStateTran::~BCStateTran() { void BCStateTran::loadMetrics() { FetchingState fs = getFetchingState(); metrics_.fetching_state_.Get().Set(stateName(fs)); - metrics_.is_fetching_.Get().Set(static_cast(fs != FetchingState::NotFetching)); + metrics_.is_fetching_.Get().Set(static_cast(isActiveDestination(fs))); metrics_.last_stored_checkpoint_.Get().Set(psd_->getLastStoredCheckpoint()); metrics_.number_of_reserved_pages_.Get().Set(psd_->getNumberOfReservedPages()); @@ -1435,7 +1435,7 @@ void BCStateTran::onFetchingStateChange(FetchingState newFetchingState) { logger_ = (newFetchingState == FetchingState::NotFetching) || isActiveSource(newFetchingState) ? ST_SRC_LOG : ST_DST_LOG; metrics_.fetching_state_.Get().Set(stateName(newFetchingState)); - metrics_.is_fetching_.Get().Set(static_cast(newFetchingState != FetchingState::NotFetching)); + metrics_.is_fetching_.Get().Set(static_cast(isActiveDestination(newFetchingState))); lastFetchingState_ = newFetchingState; } From 882cfe0c6efbffa7de0652c5d8d1a91a05673686 Mon Sep 17 00:00:00 2001 From: Gil Levkovich Date: Thu, 16 Jun 2022 15:27:31 +0300 Subject: [PATCH 2/2] client_pool_timer_test: Disable due to random failures --- client/client_pool/test/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client_pool/test/CMakeLists.txt b/client/client_pool/test/CMakeLists.txt index 8e6e6914a7..2dd73154aa 100644 --- a/client/client_pool/test/CMakeLists.txt +++ b/client/client_pool/test/CMakeLists.txt @@ -5,4 +5,6 @@ target_link_libraries(client-pool-timer-test PUBLIC GTest::Main concord_client_pool ) -add_test(client-pool-timer-test client-pool-timer-test) + +# Disabled due to instability +# add_test(client-pool-timer-test client-pool-timer-test)