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

SendingAccountor can suffer from lost updates

    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

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: