Skip to content

bug: a panic in the merge_insert splitter is indistinguishable from end of stream #9082

Description

@LuciferYang

FullSchemaMergeInsertExec::split_updates_and_inserts runs its batch loop on a detached tokio::spawn task that owns both channel senders. A panic inside that task unwinds it, drops the senders, and the update and insert receivers yield None. That is indistinguishable from a source that ended normally. The JoinHandle is dropped, so nothing observes the panic either.

Depending on where the panic lands, the writer then either commits a partial merge or trips an unrelated unwrap further down. Neither outcome reports what actually happened. The explicit error path forwards through handle_stream_processing_error; only the panic path has no route out.

Reproducer: poison the updating_row_ids mutex so the splitter panics when the first UpdateAll row reaches the capture call. The update stream returns Ok([]) rather than an error, so as far as the writer is concerned the source simply ran out of rows.

Reproduced on main at ebba5814c.

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