Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proxy delete log #889

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.getClass().getSimpleName());
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.info("[doOnEvent] {}", instanceSick.getInstance().getEndpoint());
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,17 @@ 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));
if (!clusterServer.amILeader()) {
logger.info("[getProxyTunnelInfo] not leader");
return null;
}
DcClusterShardPeer dcClusterShardPeer = new DcClusterShardPeer(backupDcId, clusterId, shardId, peerDcId);
ProxyTunnelInfo proxyTunnelInfo = proxyTunnelInfos.get(dcClusterShardPeer);
if (proxyTunnelInfo == null) {
logger.info("[getProxyTunnelInfo][unfound]{}", dcClusterShardPeer);
logger.debug("[getProxyTunnelInfo]{}", proxyTunnelInfos.keySet());
}
return proxyTunnelInfo;
}

@Override
Expand Down
Loading