-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publisher#flatMapMergeSingle mapped source duplicate termainl improve…
…d visibility (#1516) Motivation: A mapped source sending multiple terminal signals is in violation of the Reactive Streams specification [1]. However if there is a faulty source this may happen, and Publisher#flatMapMergeSingle will fail on an assertion due to the activeMappedSources being 0 in decrementActiveMappedSources. The assertion doesn't provide any additional context as to what went wrong, and the downstream source may not be completed as a result. This can be difficult to debug the root cause and understand where the duplicate terminal signal originates from. [1] https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md#1.7 Modifications: - Enhance Publisher#flatMapMergeSingle and Publisher#flatMapMerge to log a warning when a duplicate terminal signal is detected, and still allow for control flow to continue. Result: Publisher#flatMapMergeSingle and flatMapMerge still complete control flow in the presense of RS violations and provide log statement to help folks track down the cause of the duplicate terminal signal.
- Loading branch information
1 parent
7cfa6b1
commit 362a697
Showing
4 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters