-
Notifications
You must be signed in to change notification settings - Fork 354
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
Missing onComplete in requestStream and requestChannel with fragmentation #641
Comments
Haven't gotten a chance to look at this in depth but there is a change this could be related to some structural changes in 0.12.2-RC2. Have you had a chance to try this with 0.12.2-RC3? |
I haven't gotten a chance to look at this yet as I am too busy at this moment, but I'll update this ticket once it becomes relevant again. I had previously enabled it to fix an issue where my payload was too big, but this issue went away in a later update so fragmentation was no longer necessary for us. |
Ok - thanks for checking - @mostroverkhov is looking into this - we'll let you know. |
@lksvenoy-r7 did you get a chance to try @mostroverkhov fix? |
I can't reproduce this. The following: Payload payload =
DefaultPayload.create(Flux.just("a").repeat(1024 * 1024).collect(Collectors.joining()).block());
RSocketServer.create(
(setup, socket) ->
Mono.just(
new AbstractRSocket() {
@Override
public Mono<Payload> requestResponse(Payload p) {
return Mono.just(p);
}
}))
.fragment(64)
.bind(WebsocketServerTransport.create("localhost", 7000))
.subscribe();
RSocket socket =
RSocketConnector.create()
.fragment(64)
.connect(WebsocketClientTransport.create("localhost", 7000)).block();
socket
.requestResponse(payload)
.map(Payload::getDataUtf8)
.doOnNext(x -> System.out.println("got item size: " + x.length()))
.doOnTerminate(() -> System.out.println("done"))
.block(); Prints:
@lksvenoy-r7 please provide more details on how to reproduce or ideally a sample. |
When using fragmentation, the onComplete signal is sometimes missing with requestStream and requestChannel. This has been observed using many different fragmentation values (from 64 and up), and the behaviour is different locally than it is when using it over internet.
Expected Behaviour: When fragmentation is enabled, granted there are no errors, the entire payload is received by the client and the server finished by sending the COMPLETE frame.
Actual Behaviour: When fragmentation is enabled, when communicating over the internet, the socket is inconsistent, sometimes producing all payloads and the completion signal, and sometimes the payload amount varies, and no completion signal is issued.
Steps to Reproduce
Additional Information
Rsocket Version: 0.12.2-RC2
Infrastructure (Amazon): Rsocket Client -> Kong ALB -> Kong -> Service ALB -> Service
The behaviour works as expected when testing locally, but not over the internet. The load balancers have been tested and are not the issue.
Workaround
The current workaround we are using is to disable fragmentation, which resolves the issue.
If you require additional information, please let me know.
The text was updated successfully, but these errors were encountered: