You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Spring Boot Version: 2.7.2 || 1.9.8
Hello, team
When I want to use the eureka delay initial function, I found that is not effect in the case.
such as I set the property:eureka.client.initial-instance-info-replication-interval-seconds=100
But, in the EurekaServiceRegistry -- register function, used the setInstanceStatus to update initial status
@Overridepublicvoidregister(EurekaRegistrationreg) {
maybeInitializeClient(reg);
if (log.isInfoEnabled()) {
log.info("Registering application "
+ reg.getApplicationInfoManager().getInfo().getAppName()
+ " with eureka with status "
+ reg.getInstanceConfig().getInitialStatus());
}
reg.getApplicationInfoManager()
.setInstanceStatus(reg.getInstanceConfig().getInitialStatus());
reg.getHealthCheckHandler().ifAvailable(healthCheckHandler -> reg
.getEurekaClient().registerHealthCheck(healthCheckHandler));
}
and then will trigger StatusChangeEvent.
So, DiscoveryClient will be goto instanceInfoReplicator.onDemandUpdate() to register client to Eureka Server.
statusChangeListener = newApplicationInfoManager.StatusChangeListener() {
@OverridepublicStringgetId() {
return"statusChangeListener";
}
@Overridepublicvoidnotify(StatusChangeEventstatusChangeEvent) {
if (InstanceStatus.DOWN == statusChangeEvent.getStatus() ||
InstanceStatus.DOWN == statusChangeEvent.getPreviousStatus()) {
// log at warn level if DOWN was involvedlogger.warn("Saw local status change event {}", statusChangeEvent);
} else {
logger.info("Saw local status change event {}", statusChangeEvent);
}
instanceInfoReplicator.onDemandUpdate();
}
};
if (clientConfig.shouldOnDemandUpdateStatusChange()) {
applicationInfoManager.registerStatusChangeListener(statusChangeListener);
}
At last, the eureka.client.initial-instance-info-replication-interval-seconds can not take effect.
Describe the bug
Spring Boot Version: 2.7.2 || 1.9.8
Hello, team
When I want to use the eureka delay initial function, I found that is not effect in the case.
such as I set the property:
eureka.client.initial-instance-info-replication-interval-seconds=100
But, in the
EurekaServiceRegistry
--register
function, used thesetInstanceStatus
to update initial statusand then will trigger
StatusChangeEvent
.So, DiscoveryClient will be goto
instanceInfoReplicator.onDemandUpdate()
to register client to Eureka Server.At last, the
eureka.client.initial-instance-info-replication-interval-seconds
can not take effect.Sample
The text was updated successfully, but these errors were encountered: