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

300 Make the ReadStreamSubscriber serialized #304

Merged

Conversation

NilsRenaud
Copy link
Contributor

Linked to this issue: #300

Ensure the ReadStream handler is never called concurrently.

@NilsRenaud NilsRenaud force-pushed the 300_serializable_ReadstreamInputStream branch from 0fac755 to 02e1ec7 Compare January 19, 2024 07:40
@NilsRenaud
Copy link
Contributor Author

( I originally signed off the commit with the wrong mail... this is fixed, how can I relaunch the legal check ><')

Copy link
Contributor

@vietj vietj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should try to make testReadStreamElementsMustBeSerialized be the same method in ReadStreamSubscriberTestBase like other test methods to maintain a single version of it;

Ensure the ReadStream handler is never called concurrently.

Note: The Rx1 implementation is different because such stack are possible:
```
at io.vertx.rx.java.ReadStreamSubscriber.onNext(ReadStreamSubscriber.java:244) <-- won't emit its element since `emitting == true`
	at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
	at rx.internal.operators.OnSubscribeFromIterable$IterableProducer.slowPath(OnSubscribeFromIterable.java:117)
	at rx.internal.operators.OnSubscribeFromIterable$IterableProducer.request(OnSubscribeFromIterable.java:89)
	at rx.Subscriber.request(Subscriber.java:157)
	at io.vertx.rx.java.ReadStreamSubscriber.lambda$checkStatus$3(ReadStreamSubscriber.java:175)
	at io.vertx.rx.java.ReadStreamSubscriber.checkStatus(ReadStreamSubscriber.java:190)
	at io.vertx.rx.java.ReadStreamSubscriber.serializedCheckStatus(ReadStreamSubscriber.java:115) <-- Set `emitting = true`
	at io.vertx.rx.java.ReadStreamSubscriber.handler(ReadStreamSubscriber.java:70)
```

Signed-off-by: Nils Renaud <renaud.nils@gmail.com>
Signed-off-by: Nils Renaud <nils.renaud@forgerock.com>
@NilsRenaud NilsRenaud force-pushed the 300_serializable_ReadstreamInputStream branch from 02e1ec7 to 9ba87cb Compare January 22, 2024 14:03
@vietj vietj merged commit 6955e5b into vert-x3:4.x Jan 22, 2024
3 of 4 checks passed
@vietj vietj added this to the 4.5.2 milestone Jan 22, 2024
@vietj
Copy link
Contributor

vietj commented Jan 22, 2024

cc @jponge

@jponge
Copy link
Member

jponge commented Jan 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants