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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • java
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: