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

fix: 更新过程中服务间调用失败导致无损更新失效 #3242 #3244

Merged
merged 8 commits into from
Oct 11, 2024

Conversation

jsonwan
Copy link
Collaborator

@jsonwan jsonwan commented Oct 11, 2024

  1. 打印负载均衡实例获取记录,用于分析可能存在的缓存未刷新原因;
  2. 打印FeignClient调用失败时的真实URL信息用于排查问题;
  3. 调整GracefulShutdown等待时间为40s,避免边界误差导致负载均衡缓存未刷新;
  4. 修复开发过程中发现的gradle task renameArtifacts的不合理依赖关系。

调整GracefulShutdown等待时间,观察负载均衡缓存刷新情况。
打印负载均衡实例获取记录,分析缓存未刷新原因。
打印负载均衡实例获取记录,分析缓存未刷新原因。
1.打印FeignClient调用失败时的真实URL信息用于排查问题;
2.打印负载均衡实例获取记录日志。
1.调整GracefulShutdown等待时间为40s,避免边界误差导致负载均衡缓存未刷新。
1.抽取配置至公共模块,应用于所有服务。
@Override
public List<ServiceInstance> getInstances(String serviceId) {
List<ServiceInstance> serviceInstanceList = super.getInstances(serviceId);
log.debug("serviceId={}, serviceInstanceList={}", serviceId, serviceInstanceList);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isDebugEnabled 需要加上, 避免 ServiceInstance.toString 调用

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@AutoConfigureAfter({KubernetesClientAutoConfiguration.class})
@EnableConfigurationProperties(KubernetesDiscoveryProperties.class)
public class JobK8sDiscoveryClientAutoConfiguration {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 直接覆盖原始框架自动装配的方式,在后续框架升级版本变更中容易遗忘“同步原始代码”这个步骤,建议在注释代码中加上注意事项,以免后面忘记了
  2. 保险期间,可以覆盖完整,尽可能保留原框架的设计。这里少了 KubernetesDiscoveryClientHealthIndicatorConfiguration 相关的配置。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

均已添加。

@jsonwan jsonwan closed this Oct 11, 2024
@jsonwan jsonwan reopened this Oct 11, 2024
@jsonwan jsonwan closed this Oct 11, 2024
@jsonwan jsonwan reopened this Oct 11, 2024
@jsonwan jsonwan merged commit e5816c4 into TencentBlueKing:master Oct 11, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants