dubbo MigrationInvoker promotion problem
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
MigrationInvoker promotion is default 100, so this judge has problem,because it is inefficient, it doesn't need to use ThreadLocalRandom.current().nextDouble(100) where promotion is default 100.
@Override
public Result invoke(Invocation invocation) throws RpcException {
if (currentAvailableInvoker != null) {
if (step == APPLICATION_FIRST) {
// call ratio calculation based on random value
if (ThreadLocalRandom.current().nextDouble(100) > promotion) {
return invoker.invoke(invocation);
}
}
return currentAvailableInvoker.invoke(invocation);
}
Contributor guide
Research direction
Start with MigrationInvoker.invoke, especially the APPLICATION_FIRST branch and its promotion check. Confirm the default promotion path avoids the unnecessary ThreadLocalRandom call, then verify the resulting invocation behavior with the project’s relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100