From abe6b40fc966ac8be1a0fd8e1f0cf058b7f375f9 Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 9 Mar 2023 13:58:37 -0800 Subject: [PATCH] Address comments --- fdbserver/LogRouter.actor.cpp | 4 +++- fdbserver/workloads/DcLag.actor.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fdbserver/LogRouter.actor.cpp b/fdbserver/LogRouter.actor.cpp index 9cc29b5e6d..d73f17ebd7 100644 --- a/fdbserver/LogRouter.actor.cpp +++ b/fdbserver/LogRouter.actor.cpp @@ -27,6 +27,7 @@ #include "fdbserver/TLogInterface.h" #include "flow/ActorCollection.h" #include "flow/Arena.h" +#include "flow/CodeProbe.h" #include "flow/Histogram.h" #include "flow/Trace.h" #include "flow/network.h" @@ -334,7 +335,8 @@ ACTOR Future> getPeekCursorData(LogRouterData } when(wait(result ? delay(SERVER_KNOBS->LOG_ROUTER_PEEK_SWITCH_DC_TIME) : Never())) { // Peek has become stuck for a while, trying switching between primary DC and satellite - TraceEvent("LogRouterSlowPeek", self->dbgid).detail("NextTrySatellite", !useSatellite); + CODE_PROBE(true, "Detect log router slow peeks"); + TraceEvent(SevWarnAlways, "LogRouterSlowPeek", self->dbgid).detail("NextTrySatellite", !useSatellite); useSatellite = !useSatellite; result = self->logSystem->get()->peekLogRouter(self->dbgid, startVersion, self->routerTag, useSatellite); diff --git a/fdbserver/workloads/DcLag.actor.cpp b/fdbserver/workloads/DcLag.actor.cpp index 9c306d991d..31bbcc541a 100644 --- a/fdbserver/workloads/DcLag.actor.cpp +++ b/fdbserver/workloads/DcLag.actor.cpp @@ -81,11 +81,10 @@ struct DcLagWorkload : TestWorkload { } ASSERT(ips.size() > 0); - // Find all satellite tlogs - std::vector logs; // all satellite logs - for (int i = 1; i < dbInfo->get().logSystemConfig.tLogs.size(); i++) { - const auto& tlogset = dbInfo->get().logSystemConfig.tLogs[i]; - if (!tlogset.isLocal) + // Find all primary satellite tlogs + std::vector logs; // all primary satellite logs + for (const auto& tlogset : dbInfo->get().logSystemConfig.tLogs) { + if (!tlogset.isLocal || tlogset.locality != tagLocalitySatellite) continue; for (const auto& log : tlogset.tLogs) { const NetworkAddress& addr = log.interf().address();