Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] When an exception is thrown, remove the responseFuture in a timely manner #7111

Closed
1 task done
RapperCL opened this issue Aug 2, 2023 · 1 comment
Closed
1 task done

Comments

@RapperCL
Copy link
Contributor

RapperCL commented Aug 2, 2023

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

org.apache.rocketmq.remoting.netty.NettyRemotingAbstract#invokeAsyncImpl
image

In this method, When an exception is thrown, remove the responseFuture in a timely manner,Even if there is a scheduled scan(scanResponseTable) for expired tasks, it is most appropriate to remove them as soon as possible.
Moreover, when an exception occurs during sending, there is no need to consider InvokeCallback. just remove it directly

Motivation

During the process of sending a request, there may be exceptions caused by network or other reasons, which will result in the above-mentioned situation.

Describe the Solution You'd Like

In the exception block, remove responseFuture

Describe Alternatives You've Considered

Not yet

Additional Context

No response

@RapperCL RapperCL changed the title [Enhancement] Remove responseFuture from the responseTable when an exception occurs [Enhancement] When exception, it will cause responseFuture to never be removed Aug 2, 2023
@RapperCL RapperCL closed this as completed Aug 2, 2023
@RapperCL RapperCL reopened this Aug 2, 2023
@RapperCL RapperCL changed the title [Enhancement] When exception, it will cause responseFuture to never be removed [Enhancement] When an exception is thrown, remove the responseFuture in a timely manner Aug 2, 2023
lizhimins pushed a commit that referenced this issue Aug 29, 2023
…tion occurs (#7112)

* remove responseFuture when exception
* Empty-Commit

---------
Co-authored-by: chenyong152 <chenyong152@midea.com>
@cserwen
Copy link
Member

cserwen commented May 16, 2024

Has been fixed by #7112, so closed

@cserwen cserwen closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants