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

SendingAccountor can suffer from lost updates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.8.0
    • Execution - RPC
    • 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

        1. DRILL-2574.1.patch.txt
          2 kB
          Chris Westin

        Issue Links

          Activity

            People

              jnadeau Jacques Nadeau
              cwestin Chris Westin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: