Skip to content

[Bug] Make BatchExecutorQueue continue processing a batch when one queued item throws #16469

Description

@LI123456mo

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo Java 3.3.7-SNAPSHOT, OpenJDK 21.0.10, Windows 11 (x86_64)

Steps to reproduce this issue

BatchExecutorQueue takes a snapshot of everything currently queued and processes each item in turn. If one item's prepare() or flush() throws, the exception propagates out and the rest of the snapshot is never processed, even though those items were already removed from the queue. TripleWriteQueue, which extends BatchExecutorQueue in dubbo-rpc-triple, only catches CompletionException around these calls, so any other exception — a NullPointerException or IllegalStateException, for example — escapes and drops the remaining commands in that batch. Since the queue is shared across all streams of one TripleInvoker, a single failing command can affect other, unrelated calls on the same invoker.

What you expected to happen

When one queued item fails, every other item in the same batch should still be processed. The failing item should fail on its own without affecting the rest, and for TripleWriteQueue the failing command's associated result must be completed with the failure rather than left permanently incomplete.

Anything else

No response

Do you have a (mini) reproduction demo?

  • Yes, I have a minimal reproduction demo to help resolve this issue more effectively!

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions