Skip to content

Commit

Permalink
[inner-2371] fix: sql execution hang problem caused by the inability …
Browse files Browse the repository at this point in the history
…to respond to the front side due to unprocessed packets.

(cherry picked from commit dcff228、07c0c1f1c986a71fb74d0fcc0379965592c63b49)
  • Loading branch information
wenyh1 committed Jan 1, 2024
1 parent de5f5ef commit 24f4901
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected boolean beforeHandlingTask() {
@Override
public void taskToTotalQueue(ServiceTask task) {
Executor executor;
if (this.isComplexQuery()) {
if (this.isComplexQuery() || SystemConfig.getInstance().getUsePerformanceMode() == 1) {
executor = DbleServer.getInstance().getComplexQueryExecutor();
} else {
executor = DbleServer.getInstance().getBackendBusinessExecutor();
Expand All @@ -227,8 +227,8 @@ public void run() {
handleDataError(e);
} finally {
isHandling.set(false);
if (taskQueue.size() > 0) {
taskToTotalQueue(null);
if (!taskQueue.isEmpty()) {
taskToTotalQueue(taskQueue.peek());
}
}
}
Expand All @@ -238,7 +238,7 @@ public void run() {

protected void handleDataError(Exception e) {
LOGGER.info(this.toString() + " handle data error:", e);
while (taskQueue.size() > 0) {
while (!taskQueue.isEmpty()) {
clearTaskQueue();
// clear all data from the client
LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(1000));
Expand Down

0 comments on commit 24f4901

Please sign in to comment.