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:53:52 UTC

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

     [ https://issues.apache.org/jira/browse/DRILL-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Westin updated DRILL-2574:
--------------------------------
    Description: 
In SendingAccountor.waitForSendToComplete():
{code}
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
  }
}
{code}
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.

  was:
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.


> 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():
> {code}
> 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
>   }
> }
> {code}
> 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)