Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21827

CompletableFuture may wrap the original Throwable with CompletionException while propagating it

    XMLWordPrintableJSON

Details

    • Umbrella
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • None
    • asyncclient, Client
    • None

    Description

      See the stack overflow post

      https://stackoverflow.com/questions/49230980/does-completionstage-always-wrap-exceptions-in-completionexception

      It seems that, for a chain of CompletableFutures, the first child will receive the original exception, and the latter ones will receive a CompletionException, which is the wrapper of the original exception.

      This is also what I observed when debugging HBASE-21779. We need to fix this, at least, we should unwrap it when we want to return exceptions to users.

      Attachments

        Activity

          People

            zhangduo Duo Zhang
            zhangduo Duo Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: