Update BroadcastClusterInvoker.java (#10527)

faq-BroadcastClusterInvoker
This commit is contained in:
xin gu 2022-09-01 20:33:15 +08:00 committed by GitHub
parent db210e02d4
commit a159af592e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
package org.apache.dubbo.rpc.cluster.support;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;
@ -37,7 +37,7 @@ import static org.apache.dubbo.rpc.Constants.ASYNC_KEY;
*/
public class BroadcastClusterInvoker<T> extends AbstractClusterInvoker<T> {
private static final Logger logger = LoggerFactory.getLogger(BroadcastClusterInvoker.class);
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(BroadcastClusterInvoker.class);
private static final String BROADCAST_FAIL_PERCENT_KEY = "broadcast.fail.percent";
private static final int MAX_BROADCAST_FAIL_PERCENT = 100;
private static final int MIN_BROADCAST_FAIL_PERCENT = 0;
@ -76,7 +76,7 @@ public class BroadcastClusterInvoker<T> extends AbstractClusterInvoker<T> {
Throwable resultException = result.getException();
if (null != resultException) {
exception = getRpcException(result.getException());
logger.warn(exception.getMessage(), exception);
logger.warn("2-8","provider return error response","",exception.getMessage(),exception);
failIndex++;
if (failIndex == failThresholdIndex) {
break;
@ -85,7 +85,7 @@ public class BroadcastClusterInvoker<T> extends AbstractClusterInvoker<T> {
}
} catch (Throwable e) {
exception = getRpcException(e);
logger.warn(exception.getMessage(), exception);
logger.warn("2-8","provider return error response","",exception.getMessage(),exception);
failIndex++;
if (failIndex == failThresholdIndex) {
break;