diff --git a/src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java b/src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java index 289552a8..9317be6d 100644 --- a/src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java +++ b/src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java @@ -546,7 +546,7 @@ private T execute(String tableName, TableExecuteCallback callback, ObServ resetExecuteContinuousFailureCount(tableName); return t; } catch (Exception ex) { - RUNTIME.error("execute while meet exception", ex); + RUNTIME.error("execute while meet exception, try times {}", ex, tryTimes); if (odpMode) { if ((tryTimes - 1) < runtimeRetryTimes) { if (ex instanceof ObTableException) { @@ -560,6 +560,8 @@ private T execute(String tableName, TableExecuteCallback callback, ObServ ex.getMessage(), tryTimes); } } else { + logger.warn("execute while meet Exception and throw it, try times {}", + tryTimes); throw ex; } } else { @@ -710,7 +712,7 @@ private T executeMutation(String tableName, MutationExecuteCallback callb resetExecuteContinuousFailureCount(tableName); return t; } catch (Exception ex) { - RUNTIME.error("execute while meet exception", ex); + RUNTIME.error("execute while meet exception, try times {}", ex, tryTimes); if (odpMode) { if ((tryTimes - 1) < runtimeRetryTimes) { if (ex instanceof ObTableException) { @@ -720,11 +722,12 @@ private T executeMutation(String tableName, MutationExecuteCallback callb ((ObTableException) ex).getErrorCode(), ex.getMessage(), tryTimes); } else { - logger.warn( - "execute while meet Exception, exception: {}, try times {}", ex, - tryTimes); + logger.warn("execute while meet Exception, errorMsg: {}, try times {}", + ex.getMessage(), tryTimes); } } else { + logger.warn("execute while meet Exception and throw it, try times {}", + tryTimes); throw ex; } } else { diff --git a/src/main/java/com/alipay/oceanbase/rpc/bolt/transport/ObTableRemoting.java b/src/main/java/com/alipay/oceanbase/rpc/bolt/transport/ObTableRemoting.java index 3defba93..472fe554 100644 --- a/src/main/java/com/alipay/oceanbase/rpc/bolt/transport/ObTableRemoting.java +++ b/src/main/java/com/alipay/oceanbase/rpc/bolt/transport/ObTableRemoting.java @@ -111,7 +111,7 @@ public ObPayload invokeSync(final ObTableConnection conn, final ObPayload reques // If response indicates the request is routed to wrong server, we should refresh the routing meta. if (response.getHeader().isRoutingWrong()) { String errMessage = TraceUtil.formatTraceMessage(conn, request, - "routed to the wrong server: " + response.getMessage()); + "routed to the wrong server, require rerouting: " + response.getMessage()); logger.warn(errMessage); throw new ObTableRoutingWrongException(errMessage); }