mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: code review problem modification, ready to release 4.3.4
This commit is contained in:
parent
ad08406d0b
commit
73ebe83c05
@ -10,7 +10,7 @@ import tech.powerjob.server.persistence.storage.impl.GridFsService;
|
|||||||
import tech.powerjob.server.persistence.storage.impl.MySqlSeriesDfsService;
|
import tech.powerjob.server.persistence.storage.impl.MySqlSeriesDfsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description
|
* 初始化内置的存储服务
|
||||||
*
|
*
|
||||||
* @author tjq
|
* @author tjq
|
||||||
* @since 2023/7/30
|
* @since 2023/7/30
|
||||||
|
@ -160,7 +160,8 @@ public class ServerElectionService {
|
|||||||
downServerCache.remove(serverAddress);
|
downServerCache.remove(serverAddress);
|
||||||
ProtocolInfo remoteProtocol = protocolInfo.toJavaObject(ProtocolInfo.class);
|
ProtocolInfo remoteProtocol = protocolInfo.toJavaObject(ProtocolInfo.class);
|
||||||
log.info("[ServerElection] server[{}] is active, it will be the master, final protocol={}", serverAddress, remoteProtocol);
|
log.info("[ServerElection] server[{}] is active, it will be the master, final protocol={}", serverAddress, remoteProtocol);
|
||||||
return remoteProtocol.getExternalAddress();
|
// 4.3.3 升级 4.3.4 过程中,未升级的 server 还不存在 externalAddress,需要使用 address 兼容
|
||||||
|
return Optional.ofNullable(remoteProtocol.getExternalAddress()).orElse(remoteProtocol.getAddress());
|
||||||
} else {
|
} else {
|
||||||
log.warn("[ServerElection] server[{}] is active but don't have target protocol", serverAddress);
|
log.warn("[ServerElection] server[{}] is active but don't have target protocol", serverAddress);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user