You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/05/01 21:48:00 UTC

[jira] [Created] (IMPALA-6958) Use NotifyOne() where possible in DiskIoMgr

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)