From: Date: December 12 2006 4:21pm Subject: bk commit into 5.1 tree (jonas:1.2355) BUG#24949 List-Archive: http://lists.mysql.com/commits/16837 X-Bug: 24949 Message-Id: <20061212152111.A4A6E63F091@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-12-12 16:21:06+01:00, jonas@stripped +2 -0 ndb - bug#24949 make sure not too poll to long, in case of hb-failure of last db-node storage/ndb/src/ndbapi/Ndbif.cpp@stripped, 2006-12-12 16:21:05+01:00, jonas@stripped +2 -2 Make sure not to poll too long storage/ndb/src/ndbapi/TransporterFacade.cpp@stripped, 2006-12-12 16:21:05+01:00, jonas@stripped +3 -5 Make sure not to poll too long # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/51-work --- 1.46/storage/ndb/src/ndbapi/Ndbif.cpp 2006-12-12 16:21:11 +01:00 +++ 1.47/storage/ndb/src/ndbapi/Ndbif.cpp 2006-12-12 16:21:11 +01:00 @@ -1276,9 +1276,9 @@ NDB_TICKS currTime = NdbTick_CurrentMillisecond(); NDB_TICKS maxTime = currTime + (NDB_TICKS)waitTime; theMinNoOfEventsToWakeUp = noOfEventsToWaitFor; + const int maxsleep = aMilliSecondsToWait > 10 ? 10 : aMilliSecondsToWait; do { - if (waitTime < 1000) waitTime = 1000; - poll_guard->wait_for_input(waitTime); + poll_guard->wait_for_input(maxsleep); if (theNoOfCompletedTransactions >= (Uint32)noOfEventsToWaitFor) { break; }//if --- 1.54/storage/ndb/src/ndbapi/TransporterFacade.cpp 2006-12-12 16:21:11 +01:00 +++ 1.55/storage/ndb/src/ndbapi/TransporterFacade.cpp 2006-12-12 16:21:11 +01:00 @@ -1385,15 +1385,13 @@ m_tp->forceSend(m_block_no); else m_tp->checkForceSend(m_block_no); - if (wait_time == -1) //Means wait forever - response_time= WAITFOR_RESPONSE_TIMEOUT; - else - response_time= wait_time; + NDB_TICKS curr_time = NdbTick_CurrentMillisecond(); NDB_TICKS max_time = curr_time + (NDB_TICKS)wait_time; + const int maxsleep = (wait_time == -1 || wait_time > 10) ? 10 : wait_time; do { - wait_for_input(response_time); + wait_for_input(maxsleep); Uint32 state= m_waiter->get_state(); if (state == NO_WAIT) {