apple / apple/servicetalk

Reactive Streams bridge and crash in MapPublisher

Open
#855 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
1k
Forks
229
Avg merge
23h 23m
Merged PRs (30d)
16

Description

In the `MapPublisher` operator, the [comment](https://github.com/apple/servicetalk/blob/master/servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/MapPublisher.java#L58) indicates that the caller of `onNext` is responsible for handling crashes. However, the `ReactiveStreamsAdapter` [calls the servicetalk's](https://github.com/apple/servicetalk/blob/master/servicetalk-concurrent-reactivestreams/src/main/java/io/servicetalk/concurrent/reactivestreams/ReactiveStreamsAdapters.java#L185) `Publisher.Subscriber.onNext` without protection.

If I understand correctly, there is a try-catch and further code needed in the adapter to protect against this case, right? ~~I'm happy to post a PR.~~

Edit: Apparently, the project won't build or even load properly on Windows+IntelliJ so I won't be able to post a PR after all.

Contributor guide

Open the contributing guide

Research direction

Read the comment in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/MapPublisher.java around line 58 and the call in servicetalk-concurrent-reactivestreams/src/main/java/io/servicetalk/concurrent/reactivestreams/ReactiveStreamsAdapters.java around line 185. Build the project and verify that the Reactive Streams bridge handles a subscriber crash consistently with the MapPublisher contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.