Permalink
Browse files

Merge pull request #1334 from jakesmith/mergedist-deadlockfix

Fix deadlock stopping merge distribute

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
  • Loading branch information...
2 parents 76d6b8f + 230d79e commit 98041d4ec5ecf2b04e47bcf369e4272f747ca4f5 @richardkchapman richardkchapman committed Jan 24, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 thorlcr/activities/hashdistrib/thhashdistribslave.cpp
View
4 thorlcr/activities/hashdistrib/thhashdistribslave.cpp
@@ -1343,7 +1343,10 @@ class CRowPullDistributor: public CDistributorBase
assertex(!donerecv[i]);
if (self==i) {
if (stopping)
+ {
+ selfdone.signal();
return (unsigned)-1;
+ }
if (hasbuf[i]) {
bufs[i].swapWith(msg);
cBuf *cb = diskcached[i];
@@ -1430,6 +1433,7 @@ class CRowPullDistributor: public CDistributorBase
}
void startTX()
{
+ stopping = false;
delete txthread;
txthread = new cTxThread(*this);
txthread->start();

0 comments on commit 98041d4

Please sign in to comment.