Spring boot Hystrix在调用回退后不终止线程

Spring boot Hystrix在调用回退后不终止线程,spring-boot,hystrix,fallback,spring-cloud-feign,spring-boot-chaos-monkey,Spring Boot,Hystrix,Fallback,Spring Cloud Feign,Spring Boot Chaos Monkey,我正在使用混沌猴子弹簧靴测试一个假客户端的慢响应。正在调用Fallback并返回响应,但方法执行仍在继续 logger.info(“从组织ms{}获取值”,Thread.currentThread().getName()); organizationDTO=organizationRemoteData.getRemoteOrgData(organizationId);//1. info(“通过{}在缓存{}中保存数据”,organizationDTO,Thread.currentThread()

我正在使用混沌猴子弹簧靴测试一个假客户端的慢响应。正在调用Fallback并返回响应,但方法执行仍在继续

logger.info(“从组织ms{}获取值”,Thread.currentThread().getName());
organizationDTO=organizationRemoteData.getRemoteOrgData(organizationId);//1.
info(“通过{}在缓存{}中保存数据”,organizationDTO,Thread.currentThread().getName());
//在redis中保存数据
cacheOrganizationObject(organizationDTO);
回归组织;
第1行失败,调用了回退,但我仍然在日志中看到“将数据保存在缓存中”。此行为使应用程序不一致。有什么解决办法吗

日志:

Get the value from the organization ms hystrix-organizationThreadPool-1
calling fallback method to get the organization data for id 1
saving data in cache OrganizationDTO [] by hystrix-organizationThreadPool-1

您的问题是“在缓存中保存数据”为什么写在日志中?Fallback方法返回一些东西,日志记录是下一行,所以这是完全正常的。或者您认为不一致的地方在哪里?第一行触发回退和回退。因此,不应打印将数据保存在缓存中。此外,“在缓存中保存数据”打印从API而不是从回退返回的组织数据