Skip to content

Commit

Permalink
add proxy delete log
Browse files Browse the repository at this point in the history
  • Loading branch information
yifuzhou committed Sep 24, 2024
1 parent 99abb22 commit 857a4e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ private void onInstanceStateChange(Object args) {
executors.execute(new AbstractExceptionLogTask() {
@Override
protected void doRun() throws Exception {
logger.debug("[onInstanceStateChange]processor:{}", processor.getClass().getName());
processor.onEvent((AbstractInstanceEvent) args);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void onEvent(AbstractInstanceEvent event) {

@VisibleForTesting
protected void doOnEvent(AbstractInstanceEvent instanceSick) {
logger.debug("[AbstractRouteHealthEventProcessor] start");
ProxyTunnelInfo proxyTunnelInfo = findProxyTunnelInfo(instanceSick);
if (proxyTunnelInfo == null) {
logger.warn("[doOnEvent]proxy chain not found for {}", instanceSick);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,16 @@ public List<ProxyTunnelInfo> getAllProxyTunnels() {

@Override
public ProxyTunnelInfo getProxyTunnelInfo(String backupDcId, String clusterId, String shardId, String peerDcId) {
if (!clusterServer.amILeader()) return null;
return proxyTunnelInfos.get(new DcClusterShardPeer(backupDcId, clusterId, shardId, peerDcId));
logger.info("[getProxyTunnelInfo]{}-{}-{}-{}", backupDcId, clusterId, shardId, peerDcId);
if (!clusterServer.amILeader()) {
logger.debug("[getProxyTunnelInfo] no leader");
return null;
}
ProxyTunnelInfo proxyTunnelInfo = proxyTunnelInfos.get(new DcClusterShardPeer(backupDcId, clusterId, shardId, peerDcId));
if (proxyTunnelInfo == null) {
logger.info("[getProxyTunnelInfo] proxyTunnelInfo is null, proxyTunnelInfo size:{}", proxyTunnelInfos.size());
}
return proxyTunnelInfo;
}

@Override
Expand Down

0 comments on commit 857a4e9

Please sign in to comment.