Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add log #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ private <T> T execute(String tableName, TableExecuteCallback<T> 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) {
Expand All @@ -560,6 +560,8 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
ex.getMessage(), tryTimes);
}
} else {
logger.warn("execute while meet Exception and throw it, try times {}",
tryTimes);
throw ex;
}
} else {
Expand Down Expand Up @@ -710,7 +712,7 @@ private <T> T executeMutation(String tableName, MutationExecuteCallback<T> 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) {
Expand All @@ -720,11 +722,12 @@ private <T> T executeMutation(String tableName, MutationExecuteCallback<T> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Loading