You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/03/26 01:52:52 UTC

[jira] [Created] (DRILL-2574) SendingAccountor can suffer from lost updates

Chris Westin created DRILL-2574:
-----------------------------------

             Summary: SendingAccountor can suffer from lost updates
                 Key: DRILL-2574
                 URL: https://issues.apache.org/jira/browse/DRILL-2574
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - RPC
    Affects Versions: 0.7.0
            Reporter: Chris Westin
            Assignee: Chris Westin
             Fix For: 0.8.0


In SendingAccountor.waitForSendToComplete():

public synchronized void waitForSendComplete() {
    try {
      wait.acquire(batchesSent.get());
      batchesSent.set(0);
    } catch (InterruptedException e) {
      logger.warn("Failure while waiting for send complete.", e);
      // TODO InterruptedException
    }
  }

It's possible that between the time batchesSent.get() returns and that batchesSent.set(0) are executed, that additional batches could have been sent. If that happens, then the set(0) overwrites the count, losing those. This needs to be better protected against that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)