apache / apache/dubbo

the magic in RpcContext.getContext().asyncCall()

Open
#10,236 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

## Ask your question here
when i use RpcContext.getContext().asyncCall() like below

RpcContext.getContext().asyncCall(() -> userListService.inList(param))
.handle((v, t) -> {
if (Objects.isNull(t)) {
log.info("inListAsync param {} result {}", JSON.toJSONString(param), v);
return v;
} else {
log.error("inListAsyncError param {} result {}", JSON.toJSONString(param), JSON.toJSONString(v), t);
}
return false;
});

the userListService definition is
**boolean inList(UserListParam param);**

when i log in provider server i see server return true,but when i log in consumer server i see i got false
I don't know what happened here, so appreciate if someone can help 。

Contributor guide

Open the contributing guide

Research direction

Start by tracing the RpcContext.getContext().asyncCall() entry point and compare the provider's returned value with the consumer's handle callback. Determine why inList returns true on the provider but appears as false in the consumer, and document a reproducible explanation or correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.