[
https://issues.apache.org/jira/browse/DRILL-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Westin updated DRILL-2574:
--------------------------------
Attachment: DRILL-2574.1.patch.txt
> 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
>
> Attachments: DRILL-2574.1.patch.txt
>
>
> 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)