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

Up dev issue#10388 #10414

Merged
merged 6 commits into from
Aug 15, 2022
Merged

Up dev issue#10388 #10414

merged 6 commits into from
Aug 15, 2022

Conversation

TigerTurbo
Copy link
Contributor

@TigerTurbo TigerTurbo commented Aug 8, 2022

What is the purpose of the change

fix #10388

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #10414 (2670b6c) into 3.0 (4b55862) will increase coverage by 0.02%.
The diff coverage is 44.82%.

@@             Coverage Diff              @@
##                3.0   #10414      +/-   ##
============================================
+ Coverage     65.66%   65.68%   +0.02%     
+ Complexity      319      295      -24     
============================================
  Files          1234     1238       +4     
  Lines         53916    53940      +24     
  Branches       8155     8155              
============================================
+ Hits          35402    35429      +27     
+ Misses        14664    14657       -7     
- Partials       3850     3854       +4     
Impacted Files Coverage Δ
...e/dubbo/common/concurrent/DiscardOldestPolicy.java 0.00% <0.00%> (ø)
...pache/dubbo/common/concurrent/RejectException.java 25.00% <25.00%> (ø)
...mmon/threadpool/MemorySafeLinkedBlockingQueue.java 48.27% <53.84%> (+9.38%) ⬆️
...rg/apache/dubbo/common/concurrent/AbortPolicy.java 100.00% <100.00%> (ø)
.../apache/dubbo/common/concurrent/DiscardPolicy.java 100.00% <100.00%> (ø)
...org/apache/dubbo/rpc/protocol/AbstractInvoker.java 66.97% <0.00%> (-3.67%) ⬇️
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0.00%> (-3.51%) ⬇️
...ubbo/common/url/component/param/DynamicValues.java 78.12% <0.00%> (-3.13%) ⬇️
.../registry/zookeeper/ZookeeperServiceDiscovery.java 68.35% <0.00%> (-2.54%) ⬇️
...a/org/apache/dubbo/monitor/dubbo/DubboMonitor.java 88.09% <0.00%> (-2.39%) ⬇️
... and 19 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

README.md Outdated
Comment on lines 13 to 14
Apache Dubbo is a high-performance, Java-based open-source RPC framework. Please visit the [official site](http://dubbo.apache.org) for
the quick start guide and documentation, as well as the [wiki](https://github.com/apache/dubbo/wiki) for news, FAQ, and release notes.
Copy link
Member

Choose a reason for hiding this comment

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

why change this line

*
* @throws RejectException if there is no more memory
*/
void reject(E e, MemorySafeLinkedBlockingQueue<E> queue);
Copy link
Member

Choose a reason for hiding this comment

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

MemorySafeLinkedBlockingQueue => Queue would be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if there is no more memory will be throw RejectException

Copy link
Member

Choose a reason for hiding this comment

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

I mean it's better to change the signature of this function to void reject(E e, Queue<E> queue). The Rejector here should not be coupled with actual queue types like MemorySafeLinkedBlockingQueue.

Comment on lines +86 to +88
public void setRejector(final Rejector<E> rejector) {
this.rejector = rejector;
}
Copy link
Member

Choose a reason for hiding this comment

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

How can the user change this field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

new出来这个队列,再set进去,如下图所示
image

*
* @throws RejectException if there is no more memory
*/
void reject(E e, MemorySafeLinkedBlockingQueue<E> queue);
Copy link
Member

Choose a reason for hiding this comment

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

I mean it's better to change the signature of this function to void reject(E e, Queue<E> queue). The Rejector here should not be coupled with actual queue types like MemorySafeLinkedBlockingQueue.

@TigerTurbo
Copy link
Contributor Author

ok

@AlbumenJ AlbumenJ merged commit 9b6c463 into apache:3.0 Aug 15, 2022
@AlbumenJ AlbumenJ added this to the 3.0.11 milestone Aug 16, 2022
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.

[type: new feature] support custom reject in MemorySafeLinkedBlockingQueue
3 participants