Tim Armstrong created IMPALA-6958:
-------------------------------------

             Summary: Use NotifyOne() where possible in DiskIoMgr
                 Key: IMPALA-6958
                 URL: https://issues.apache.org/jira/browse/IMPALA-6958
             Project: IMPALA
          Issue Type: Sub-task
          Components: Backend
    Affects Versions: Impala 2.12.0
            Reporter: Tim Armstrong


I noticed one place in DiskIoMgr where I *think* it's valid to use NotifyOne():

{code}
  /// Enqueue the request context to the disk queue.  The DiskQueue lock must 
not be taken.
  inline void EnqueueContext(RequestContext* worker) {
    {
      boost::unique_lock<boost::mutex> disk_lock(lock);
      /// Check that the reader is not already on the queue
      DCHECK(find(request_contexts.begin(), request_contexts.end(), worker) ==
          request_contexts.end());
      request_contexts.push_back(worker);
    }
    work_available.NotifyAll();
  }
{code}

I think this can result in a bunch of unnecessary wakeups for disk threads when 
there's > 1 disk thread per queue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to