Skip to content

Commit

Permalink
Merge pull request #3857 from actiontech/3.21.02.99/lts_2371_c
Browse files Browse the repository at this point in the history
[inner-2371] fix: sql execution hang problem caused by the inability to respond to the front side due to unprocessed packets.
  • Loading branch information
wenyh1 authored Jan 16, 2024
2 parents 00349ea + 363fde3 commit 604bfc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ protected void doHandle(ServiceTask task) {
handleDataError(e);
} finally {
isHandling.set(false);
if (taskQueue.size() > 0) {
doHandle(null);
if (!taskQueue.isEmpty()) {
doHandle(taskQueue.peek());
}
}
});
Expand All @@ -125,7 +125,7 @@ public void execute(ServiceTask task) {
handleDataError(e);
} finally {
isHandling.set(false);
if (taskQueue.size() > 0) {
if (!taskQueue.isEmpty()) {
doHandle(task);
}
}
Expand Down Expand Up @@ -215,7 +215,7 @@ protected void handleInnerData(byte[] data) {
protected void handleDataError(Exception e) {
LOGGER.warn(this.toString() + " handle data error:", e);
connection.close("handle data error:" + e.getMessage());
while (taskQueue.size() > 0) {
while (!taskQueue.isEmpty()) {
clearTaskQueue();
// clear all data from the client
LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(1000));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ protected boolean beforeHandlingTask() {
@Override
protected Executor getExecutor() {
Executor executor;
if (complexQuery) {
if (complexQuery || SystemConfig.getInstance().getUsePerformanceMode() == 1) {
executor = DbleServer.getInstance().getComplexQueryExecutor();
} else {
executor = DbleServer.getInstance().getBackendBusinessExecutor();
Expand Down

0 comments on commit 604bfc4

Please sign in to comment.