incubator-seata-go
incubator-seata-go copied to clipboard
feature:dynamic adjustment grade
What would you like to be added: 连续错误数降级后,通过连续成功数恢复全局事务 设置连续降级次数等同于升级次数 degradeCheckAllowTimes 升降级达标阈值,默认10 degradeCheckPeriod 服务自检频率 默认 2000ms degradeCheck 动态升降级开关 首先由startDegradeCheck启动定时任务,自动begin,commit,检查服务可用性.以及switchTransactionalExecutor.Code来协助判断服务可用.如果服务不可用degradeNum<degradeCheckAllowTimes(升降级阈值),那么进行degradeNum++,如果累加后达标了,提示用户当前已被降级. 如果当前服务已经被降级degradeNum==degradeCheckAllowTimes成立,自检服务通过自检后,进行累加reachNum的值,连续成功数达到degradeCheckAllowTimes后,服务恢复正常可用. 全局事务改通过此判断来确定是否开启全局事务disable || (degradeCheck && degradeNum >= degradeCheckAllowTimes); 两者皆表示可以开启全局事务,全局事务才会开启
参考PR:https://github.com/seata/seata/pull/2253
Why is this needed:
assign me
RoBot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
assign me
Is there a plan to support the feature 🤔️
pls assign me, I wanna try it :) @luky116