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

release 2.19.03.4/lts #1865

Merged
merged 5 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
reachedConCount thread safe #1139
  • Loading branch information
yanhuqing666 authored and Lordess committed May 27, 2020
commit ca67bc2d2b133086644f01e7161c7aa9949c7f00
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
public class MultiNodeEasyMergeHandler extends MultiNodeMergeHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(MultiNodeEasyMergeHandler.class);
private int rowEndConCount = 0;

public MultiNodeEasyMergeHandler(long id, RouteResultsetNode[] route, boolean autocommit, NonBlockingSession session) {
super(id, route, autocommit, session);
Expand Down Expand Up @@ -88,7 +89,7 @@ public void rowEofResponse(byte[] data, boolean isLeft, BackendConnection conn)
return;
lock.lock();
try {
if (reachedConCount == route.length) {
if (++rowEndConCount == route.length) {
session.setHandlerEnd(this);
nextHandler.rowEofResponse(null, this.isLeft, conn);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class MultiNodeMergeHandler extends OwnThreadDMLHandler {
protected final ReentrantLock lock;
final List<BaseSelectHandler> exeHandlers;
protected RouteResultsetNode[] route;
int reachedConCount;
int reachedConCount = 0;

public MultiNodeMergeHandler(long id, RouteResultsetNode[] route, boolean autocommit, NonBlockingSession session) {
super(id, session);
Expand Down