Skip to content
New issue

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

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

Already on GitHub? # to your account

Callback mode supports default rejection policy adjustment #1132

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

JervyShi
Copy link
Member

Motivation:

Fix #1131

Modification:

Describe the idea and modifications you've done.

Result:

Fixes #.

If there is no issue then describe the changes introduced by this PR.

@JervyShi JervyShi added this to the 5.8.1 milestone Nov 24, 2021
@sofastack-bot sofastack-bot bot added cla:yes CLA is ok size/L labels Nov 24, 2021
@JervyShi
Copy link
Member Author

Link sofastack/sofa-bolt#265

@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #1132 (ac6ffeb) into master (de7a124) will increase coverage by 0.06%.
The diff coverage is 96.87%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1132      +/-   ##
============================================
+ Coverage     70.79%   70.85%   +0.06%     
+ Complexity      830      828       -2     
============================================
  Files           405      405              
  Lines         17088    17100      +12     
  Branches       2669     2669              
============================================
+ Hits          12098    12117      +19     
+ Misses         3607     3597      -10     
- Partials       1383     1386       +3     
Impacted Files Coverage Δ
...in/java/com/alipay/sofa/rpc/common/RpcOptions.java 100.00% <ø> (ø)
.../sofa/rpc/message/bolt/AbstractInvokeCallback.java 91.17% <87.50%> (-1.14%) ⬇️
...ava/com/alipay/sofa/rpc/config/ConsumerConfig.java 77.64% <100.00%> (+0.53%) ⬆️
...java/com/alipay/sofa/rpc/module/LookoutModule.java 52.38% <0.00%> (-33.34%) ⬇️
...a/com/alipay/sofa/rpc/common/utils/ClassUtils.java 78.23% <0.00%> (-2.05%) ⬇️
...lipay/sofa/rpc/registry/consul/ConsulRegistry.java 47.25% <0.00%> (-0.55%) ⬇️
...va/com/alipay/sofa/rpc/client/AbstractCluster.java 69.63% <0.00%> (-0.53%) ⬇️
...n/java/com/alipay/sofa/rpc/common/SofaConfigs.java 86.79% <0.00%> (+1.88%) ⬆️
...y/sofa/rpc/transport/bolt/BoltClientTransport.java 85.71% <0.00%> (+2.48%) ⬆️
.../main/java/com/alipay/sofa/rpc/event/EventBus.java 80.39% <0.00%> (+7.84%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de7a124...ac6ffeb. Read the comment docs.

Copy link
Collaborator

@EvenLjj EvenLjj left a comment

Choose a reason for hiding this comment

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

LGTM

}

try {
latch.await(100L * invokeCount, TimeUnit.MILLISECONDS);
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait time will be 100 * invokeCount ms, if invokeCount==100 ,this case will run 10s. It is too long

Copy link
Member Author

@JervyShi JervyShi Nov 26, 2021

Choose a reason for hiding this comment

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

This is the worst case time consumption, the actual execution time should be (invokeCount / max_threadNum)*100 or so, latch await will stop when count is 0, I have tried to use this time consumption, in the local execution of about 1s, but because of the CI machine performance is poor, the execution is easy to execute before the completion of the timeout results in test case failure, so I modified the maximum wait time.

Copy link
Contributor

@OrezzerO OrezzerO left a comment

Choose a reason for hiding this comment

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

LGTM

@EvenLjj EvenLjj merged commit c687eeb into sofastack:master Nov 26, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callback mode supports default rejection policy adjustment when the thread pool is full
3 participants