HaiqiQin commented on code in PR #4488:
URL: https://github.com/apache/shenyu/pull/4488#discussion_r1141276355
##########
shenyu-plugin/shenyu-plugin-divide/src/main/java/org/apache/shenyu/plugin/divide/DividePlugin.java:
##########
@@ -110,8 +114,15 @@ protected Mono<Void> doExecute(final ServerWebExchange
exchange, final ShenyuPlu
exchange.getAttributes().put(Constants.RETRY_STRATEGY,
StringUtils.defaultString(ruleHandle.getRetryStrategy(),
RetryEnum.CURRENT.getName()));
exchange.getAttributes().put(Constants.LOAD_BALANCE,
StringUtils.defaultString(ruleHandle.getLoadBalance(),
LoadBalanceEnum.RANDOM.getName()));
exchange.getAttributes().put(Constants.DIVIDE_SELECTOR_ID,
selector.getId());
- return ruleHandle.getLoadBalance().equals(P2C) ?
chain.execute(exchange).doOnSuccess(e -> responseTrigger(upstream
- )).doOnError(throwable -> responseTrigger(upstream)) :
chain.execute(exchange);
+ if (ruleHandle.getLoadBalance().equals(P2C)) {
Review Comment:
Different strategies require different methods to be implemented.Does it
need improvement?
--
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]