List:Commits« Previous MessageNext Message »
From:Ole John Aske Date:November 10 2010 12:02pm
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch
(ole.john.aske:3358)
View as plain text  
#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:jonas@stripped

 3358 Ole John Aske	2010-11-10
      spj-svs: NdbQueryImpl::handleBatchComplete() should not return 'resume==true' for an ordered scan 
      until all pending fragments has completed.
      
      This will reduce sporious wakeup of application threads for ordered scans.

    modified:
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2010-11-10 08:01:00 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2010-11-10 12:02:26 +0000
@@ -1932,7 +1932,10 @@ NdbQueryImpl::handleBatchComplete(Uint32
     if (getQueryDef().isScanQuery())
     {
       root.handleBatchComplete(fragNo);  // Only required for scans
-      resume = (m_pendingFrags==0) || true;
+
+      // Only ordered scans has to wait until all pending completed
+      resume = (m_pendingFrags==0) ||
+               (root.m_ordering==NdbQueryOptions::ScanOrdering_unordered);
     }
     else
     {


Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20101110120226-xkmij792yqg0ilhv.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3358) Ole John Aske10 Nov