Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1888

Java: if batch times out before being sent, wrong deferred is returned

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: java
    • Labels:
      None

      Description

      I spent some time looking into a test failure of TestAsyncKuduSession.testInsertIntoUnavailableTablet(). The test fails if the machine is under load because of what looks something likke the following:

      • the DeadlineTracker for a Batch is created with timeout 1
      • the process loses the CPU for a few milliseconds
        We get to the following:
                addBatchCallbacks(batch);
                batchResponses.add(client.sendRpcToTablet(batch));
        

      Typically sendRpcToTablet() returns request.getDeferred(). But in the case that it has already timed out, it returns an error deferred immediately, without firing the request's errback. This means that the deferred in batchResponses contains an error, because the batch callbacks added by `addBatchCallbacks` don't actually get triggered.

        Attachments

          Activity

            People

            • Assignee:
              tlipcon Todd Lipcon
              Reporter:
              tlipcon Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: