Skip to content

4.x: RequestTracker exceptions can interrupt request lifecycle cleanup #1015

Description

@dkropachev

Problem

Request-tracker callbacks run inline with request lifecycle transitions. A throwing tracker can prevent later cleanup from running, replace the original failure, or leave request state incomplete.

DefaultDriverContext returns a lone configured RequestTracker directly; only multiple trackers are wrapped by MultiplexingRequestTracker, which contains callback exceptions.

Examples include:

  • CqlRequestHandler.handleRequestSetupFailure() calling onNodeError() before decrementing the active execution count;
  • CqlRequestHandler.setFinalError() calling onError() before returning the throttler permit;
  • equivalent unguarded tracker notifications in other success and failure paths.

Expected behavior

A RequestTracker exception must be logged and isolated. It must not:

  • replace the request result;
  • interrupt active-execution bookkeeping;
  • skip timeout, stream, or throttler cleanup;
  • affect another request.

Relationship to #1007

#1007 contains synchronous request-setup failures and performs their normal lifecycle cleanup. It intentionally does not add systemic RequestTracker exception isolation; doing that correctly requires auditing all tracker notification sites rather than guarding only the new setup-failure path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions