swxEmily opened a new issue, #4929:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4929
### Steps to Reproduce
1. 自定义流控handler:provider-service-handler
2. Edge服务配置Provider handler对所有待转发的请求(转发至多个不同微服务)进行流控控制
### Expected Behavior
自定义流控未执行
### Servicecomb Version
2.9.0
### Additional Context
AbstractRestInvocation中checkQpsFlowControl只能执行CSE自带的ProviderQpsFlowControlHandler,不能执行自定义的流控handler,且函数为private,也不能通过自定义子类覆盖
`private Holder<Boolean> checkQpsFlowControl(OperationMeta operationMeta) {
Holder<Boolean> qpsFlowControlReject = new Holder<>(false);
@SuppressWarnings("deprecation")
Handler providerQpsFlowControlHandler =
operationMeta.getProviderQpsFlowControlHandler();
if (null != providerQpsFlowControlHandler) {
try {
providerQpsFlowControlHandler.handle(invocation, response -> {
qpsFlowControlReject.value = true;
produceProcessor =
ProduceProcessorManager.INSTANCE.findDefaultJsonProcessor();
sendResponse(response);
});
} catch (Throwable e) {
LOGGER.error("failed to execute ProviderQpsFlowControlHandler", e);
qpsFlowControlReject.value = true;
sendFailResponse(e);
}
}
return qpsFlowControlReject;
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]