Address comments

This commit is contained in:
Jingyu Zhou 2023-03-09 13:58:37 -08:00
parent 5c97fb2c20
commit abe6b40fc9
2 changed files with 7 additions and 6 deletions

View File

@ -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<Reference<ILogSystem::IPeekCursor>> 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);

View File

@ -81,11 +81,10 @@ struct DcLagWorkload : TestWorkload {
}
ASSERT(ips.size() > 0);
// Find all satellite tlogs
std::vector<NetworkAddress> 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<NetworkAddress> 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();