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
增加redisRegistry consumer侧的服务探活逻辑 #7929
Conversation
Fix the problem that LocalDate type is forced to be converted to LocalDateTime error
Would you please add some ut cases to verify this PR? |
done |
Codecov Report
@@ Coverage Diff @@
## master #7929 +/- ##
============================================
+ Coverage 60.46% 61.16% +0.69%
+ Complexity 544 491 -53
============================================
Files 1089 1090 +1
Lines 43845 43965 +120
Branches 6404 6427 +23
============================================
+ Hits 26509 26889 +380
+ Misses 14370 14095 -275
- Partials 2966 2981 +15
Continue to review full report at Codecov.
|
I don't know why you submitted |
File changed only |
增加redisRegistry consumer侧的服务探活逻辑
目前redisRegistry的实现中,provider异常(未执行注销逻辑,如被kill -9)下线,只在
monitoring center
存在的情况下会对过期的provider进行下线操作,这有两个缺点:解法:
在consumer侧对订阅到的服务进行检查,每隔
1/2 session
时间检查provider是否过期,如果过期,对它执行doNotify
,即重新从redis获取最新数据,验证过期时间。验证:
旧逻辑:使用redisRegistry,启动2个provider,1个consumer,对其中1个provider执行kill -9,consumer调用会有部分请求报错。
新逻辑:使用redisRegistry,启动2个provider,1个consumer,对其中1个provider执行kill -9,consumer会在
1/2 session
时间(默认30s,可配置)内将有问题的provider踢掉。notify日志可以看出只有1个provider了