Skip to content

bug: propagate TaskExecutor shutdown failures #7914

Description

@u70b3

Bug

TaskExecutor::shutdown_all logs handler cleanup failures and task panics but always returns Ok(()). Since ShardWriter::close merges that result into its close result, a failed task shutdown can be reported to callers as a successful close.

Expected behavior

  • Preserve and return the first handler error or task panic.
  • Continue joining every remaining task so shutdown is still complete.
  • Keep the existing diagnostic logging for every failed task.

Reproduction

Register a message handler whose cleanup returns an intentional error, then call shutdown_all. The current implementation logs the error and returns Ok(()) instead of surfacing it.

Acceptance criteria

  • shutdown_all returns an error when a handler cleanup returns an error.
  • shutdown_all returns an error when a handler task panics.
  • A failure does not prevent the executor from joining the remaining tasks.
  • Existing successful-shutdown tests explicitly assert Ok(()) instead of discarding the result.
  • ShardWriter::close continues to include task-shutdown failures in its staged close result.

Scope

This issue covers task-executor shutdown error propagation only. Other MemWAL close, durability, fencing, and index-validation behavior is out of scope.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions