I am not sure if this change can work properly. 
`this.resultFuture = 
resultFuture.thenApply(fn.compose(beforeContext).andThen(afterContext));`
By using the newest Future instance every time, we can guarantee the execute 
sequences of each Filter' callback. 

For example, if we have a filter chain like this (when result returning back): 
`Invoker -> Filter1 -> Filter2 -> Filter3`.
1. If we use the code you provide, when Invoker finishes, it will trigger the 
callback of Filter1, Filter2 and Filter3;
2. But if we use the old code, when Invoker finishes, it will trigger callback 
of Filter1, then if Filter1 callback finishes, it will trigger Filter2, ...

[ Full content available at: 
https://github.com/apache/incubator-dubbo/pull/2498 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to