This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 1e5e99ed362 Print expected type of exception when debug is enabled in
proxy (#24246)
1e5e99ed362 is described below
commit 1e5e99ed36223c9026fbae3c7e81eb83d8845681
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Thu Mar 23 18:27:16 2023 +0800
Print expected type of exception when debug is enabled in proxy (#24246)
---
.../shardingsphere/proxy/frontend/command/CommandExecutorTask.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
index ce96123c391..c22f7c884f8 100644
---
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
+++
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
@@ -131,6 +131,8 @@ public final class CommandExecutorTask implements Runnable {
private void processException(final Exception cause) {
if (!ExpectedExceptions.isExpected(cause.getClass())) {
log.error("Exception occur: ", cause);
+ } else if (log.isDebugEnabled()) {
+ log.debug("Exception occur: ", cause);
}
context.write(databaseProtocolFrontendEngine.getCommandExecuteEngine().getErrorPacket(cause));
Optional<DatabasePacket<?>> databasePacket =
databaseProtocolFrontendEngine.getCommandExecuteEngine().getOtherPacket(connectionSession);