Skip to content

Commit

Permalink
Merge pull request #1083 from actiontech/issue_1058
Browse files Browse the repository at this point in the history
issue #1058
  • Loading branch information
yanhuqing666 committed Mar 27, 2019
2 parents 8cd6b0f + ede864c commit da14022
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Expand Up @@ -9,6 +9,7 @@
import com.actiontech.dble.backend.BackendConnection;
import com.actiontech.dble.backend.mysql.CharsetUtil;
import com.actiontech.dble.backend.mysql.nio.MySQLConnection;
import com.actiontech.dble.backend.mysql.nio.handler.query.DMLResponseHandler;
import com.actiontech.dble.backend.mysql.nio.handler.query.OwnThreadDMLHandler;
import com.actiontech.dble.backend.mysql.nio.handler.util.HandlerTool;
import com.actiontech.dble.backend.mysql.nio.handler.util.RowDataComparator;
Expand Down Expand Up @@ -216,8 +217,17 @@ protected void ownThreadJob(Object... objects) {
rightLocal = takeFirst(rightQueue);
}
}
session.setHandlerEnd(this);

HandlerTool.terminateHandlerTree(this);
// for trace, when join end before all rows return ,the handler should mark as finished
for (DMLResponseHandler mergeHandler : this.getMerges()) {
DMLResponseHandler handler = mergeHandler;
while (handler != null && handler != this) {
session.setHandlerEnd(handler);
handler = handler.getNextHandler();
}
}
session.setHandlerEnd(this);
nextHandler.rowEofResponse(null, isLeft, conn);
} catch (Exception e) {
String msg = "join thread error, " + e.getLocalizedMessage();
Expand Down
Expand Up @@ -165,7 +165,7 @@ public List<String[]> genTraceResult() {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("collect info not in pairs,veryEnd:" + veryEnd + ",connFlagMap.size:" + connFlagMap.size() +
",connReceivedMap.size:" + connReceivedMap.size() + ",connFinishedMap.size:" + connFinishedMap.size() +
",recordStartMap.size:" + connReceivedMap.size() + ",recordEndMap.size:" + connFinishedMap.size());
",recordStartMap.size:" + recordStartMap.size() + ",recordEndMap.size:" + recordEndMap.size());
}
return null;
}
Expand Down

0 comments on commit da14022

Please sign in to comment.