Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2574

SendingAccountor can suffer from lost updates

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: Execution - RPC
    • Labels:
      None

      Description

      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.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jnadeau Jacques Nadeau
              Reporter:
              cwestin Chris Westin

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment