-
Notifications
You must be signed in to change notification settings - Fork 324
Adopt reactor-netty 0.9.0.RELEASE #984
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
Conversation
|
✅ Hey nictas! The commit authors and yourself have already signed the CLA. |
9d8f9ae to
056934a
Compare
|
I'm testing this change now, and in the meantime have flagged the related reactor-netty issue so hopefully we'll get a fix soon. |
|
Thanks! Let me know if I can help in any way. |
|
I ran our load tests against this change and unfortunately, I reproduced another issue, which seems to come from the Netty client. I tracked it here: The "good" news is that for about 20000 requests, I was able to reproduce it only 3 times. |
|
@nictas I've done an initial test run (takes a while!) and all looks good except for downloading a droplet. I'm pretty sure that's just an artifact of the way I'm running the tests, but if you have time and the ability to try downloading a droplet in your own environment I'd be interested in the result. |
|
I'll try it out tomorrow. |
Why do you use an old Netty version (4.1.29). Reactor Netty 0.8.10 runs with 4.1.36 (even pretty well with 4.1.38 except this issue netty/netty#9436, which I believe does not affect you) |
I hadn't noticed that the Netty client's version is being downgraded until I saw your comment. Apparently, the version of Netty is not coming from Reactor Netty's transitive dependency, but from the |
|
For reference I've updated locally to Boot 2.0.9, which provides netty 4.1.34 (I'm also looking at Boot 2.1, but that's a little more involved). Seems to work ok, though I don't know about the impact on the load test issue. |
|
Apparently, the Netty issue will be fixed in their next release: |
|
@twoseat I reproduced the issue with the download of droplets. The problem is that the client does not follow redirects and even when it does, it forwards the |
|
Maybe I'm doing something wrong, but I can't seem to convince the Reactor Netty client to stop forwarding the |
|
@twoseat I updated the pull request with my latest changes. The issue with the download of droplets and applications should be fixed now. I tried to download an application, a droplet and a package and all seemed good with one exception - I could not open the downloaded droplet. The file had a significant size of around 300MB, but apparently was not in a ZIP format like the application and the package. Is this normal? |
|
Btw, we still should NOT merge this pull request yet. The upload of applications is still a problem for applications larger than 10MBs. @violetagg gave me a workaround for reactor/reactor-netty#811, but I'm having some problems with applying it to the cf-java-client. We're currently looking into what's going wrong and I'll update this pull request as soon as we have a solution. |
|
I believe the droplet is a |
|
You're right! The droplet is in fact a |
|
Thanks for the update (and the ongoing great work!) I'll take a look as soon as I have time. Have you tried using the |
|
@twoseat In terms of implementation, this PR is finished (at least until your review - I'll rework it, if you don't like how something turned out). I tested how the file upload works with reactor-netty 0.9.0.RC1 and everything's good at least so far. The only thing left from my side is to run our load tests against this change. I'll post results on Monday (probably). |
|
@twoseat All of our load and functional tests pass, so from my point-of-view this pull request can now be merged (assuming that you have no comments that need to be addressed). We could also wait for the official 0.9.0 release of reactor-netty. One important note: We only use a subset of the cf-java-client's features, so our tests can't confirm that everything is working properly. I trust your integration tests to catch any issues that have slipped by our tests. |
|
Thanks @nictas - we'll wait for the official |
|
You should be able to update this PR to |
Before the recent rebase onto modern versions of Reactor Netty ([#984]), when the Client received a 401 Unauthorized, it would invalidated any existing token and then resubscribe with the same request causing a new token to be negotiated the request to be retried, transparently to the user. During the rebase, this functionality was lost (an easy mistake to make given that there are no tests for it...) resulting in invalidation of the token, but no re-subscription and therefore the failure was exposed to the user. This change re-introduced the previous re-subscribe behavior. Signed-off-by: Ben Hale <[email protected]>
Several notes in no particular order:
OutOfDirectMemoryErrors if the size of the file exceeds a certain threshold (around 10MBs). This problem is marked with aFIXMEcomment in theMultipartHttpClientRequestand is reported to Reactor Netty in Chaining methods in NettyOutbound has weird results reactor/reactor-netty#811. In my opinion, this pull request should NOT be merged until that bug/limitation is fixed and a newer version of the library can be adopted. With that said, the pull request can be reviewed, as the fix for the issue should not affect any other classes besidesMultipartHttpClientRequest.last_operation), create service keys.cloudfoundry-client.requestandcloudfoundry-client.responseare set toDEBUG.