Cancel retry requests before AsyncRequestsSender is destroyed

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-12-08, QE 2025-11-24
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      BF-40614 indicated that there can be a problem when an AsyncRequestsSender instance is destroyed while it still has retry requests scheduled.
      In this particular case, the AsyncRequestsSender was destroyed here, but it still had retry (delayed) retry requests scheduled to executed.
      When these retry requests were then executed after the AsyncRequestsSender instance was destroyed, this produced undefined behavior, because all data structures for the AsyncRequestsSender instance and its remote have already been freed.

      This led to use-after-free errors in the new rate_limited tests, which intentionally answer some requests to the shards with HostUnreachable errors and thus force retries.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: