Skip to content

Conversation

@mxsm
Copy link
Member

@mxsm mxsm commented Feb 25, 2023

Fixes #3267

Motivation

Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.

Modifications

Refactor RequestContext

CountDownLatch replace with CompletableFuture

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@codecov
Copy link

codecov bot commented Feb 25, 2023

Codecov Report

Merging #3268 (bbab3dd) into master (7ec90de) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

❗ Current head bbab3dd differs from pull request most recent head 7d3f77b. Consider uploading reports for the commit 7d3f77b to get more accurate results

@@             Coverage Diff              @@
##             master    #3268      +/-   ##
============================================
- Coverage     13.07%   13.04%   -0.03%     
+ Complexity     1195     1191       -4     
============================================
  Files           550      550              
  Lines         28703    28700       -3     
  Branches       2851     2850       -1     
============================================
- Hits           3752     3743       -9     
- Misses        24625    24632       +7     
+ Partials        326      325       -1     
Impacted Files Coverage Δ
...he/eventmesh/client/tcp/common/RequestContext.java 0.00% <0.00%> (ø)
.../apache/eventmesh/client/tcp/common/TcpClient.java 13.82% <0.00%> (-0.15%) ⬇️
...tandalone/broker/task/HistoryMessageClearTask.java 29.41% <0.00%> (-17.65%) ⬇️
...mesh/connector/standalone/broker/MessageQueue.java 31.64% <0.00%> (-7.60%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

throw new TimeoutException("operation timeout, context.key=" + c.getKey());
}
return c.getResponse();
return context.getResponse(timeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where execute supplyAsync with CompletableFuture?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mxsm I think original code is better ,its advantages include currency and timeout controller logic.

@mxsm mxsm requested a review from jonyangx February 26, 2023 08:50
@mxsm
Copy link
Member Author

mxsm commented Feb 26, 2023

@jonyangx PTAL~

@mxsm mxsm force-pushed the eventmesh-3267 branch from 31ac9d7 to 7d3f77b Compare March 3, 2023 16:52
@jonyangx jonyangx merged commit 94562e9 into apache:master Mar 4, 2023
@mxsm mxsm deleted the eventmesh-3267 branch March 4, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Refactor RequestContext

2 participants