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

future invoke would block at org.apache.dubbo.rpc.AsyncRpcResult#getValue #3169

Closed
uglycow opened this issue Jan 8, 2019 · 7 comments
Closed
Labels
type/bug Bugs to being fixed
Milestone

Comments

@uglycow
Copy link
Contributor

uglycow commented Jan 8, 2019

future invoke would block at org.apache.dubbo.rpc.AsyncRpcResult#getValue.

DubboInvoker now return AsyncRpcResult other than RpcResult with a default value. the framework would block when a filter try to access the the result value, even though it's future invoke.

it just behave differently.

@carryxyh
Copy link
Member

carryxyh commented Jan 8, 2019

If u want to get value from future and the future is not completed, it will block.

DubboInvoker now return AsyncRpcResult other than RpcResult with a default value

Nope, just in async way, but not in sync way.

@uglycow
Copy link
Contributor Author

uglycow commented Jan 8, 2019

the invoke return very soon and i would get a default value when i access the result value in my filter in async way before.

now, the invoke would block and i would get the real value when i access the result value in my filter.

different behavior.

@carryxyh
Copy link
Member

carryxyh commented Jan 8, 2019

Don't get your point.
Is this cause some exceptions or sth?

Due to the new async method used in the latest version of dubbo. If you need to handle real results in a filter in an asynchronous scenario, use the onResponse method.

@uglycow
Copy link
Contributor Author

uglycow commented Jan 8, 2019

i mean if a legacy filter occasionally tried to access the result value, we would get blocked there, that's not the case before.

@carryxyh
Copy link
Member

carryxyh commented Jan 8, 2019

Yes,
The new version is not compatible with the upgrade. The old version of the filter needs to be modified to a certain extent, which is normal.

@chickenlj
Copy link
Contributor

DubboInvoker now return AsyncRpcResult other than RpcResult with a default value. the framework would block when a filter try to access the the result value, even though it's future invoke.

I agree with what @uglycow pointed out, we should avoid blocking legacy Filter extensions.

@chickenlj chickenlj added type/bug Bugs to being fixed priority/blocker labels Jan 9, 2019
@chickenlj chickenlj added this to the 2.7.0 milestone Jan 9, 2019
@chickenlj
Copy link
Contributor

Fixed with #3185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

3 participants