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

SingleConcatWithPublisher: limit recursion depth to 1 #1654

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

To mitigate #1652 issue, temporary limit the mutual recursion between
onNext and request to a depth of 1 for ConcatDeferNextSubscriber.

Modifications:

  • Introduce additional SINGLE_DELIVERING state to understand if the
    request was invoked while we deliver result of the Single;
  • Remove boundedDepthOfOnNextAndRequestRecursion() override from
    SingleConcatWithPublisherDeferSubscribeTckTest;

Result:

  1. SingleConcatWithPublisher has a maximum recursion depth of 1.
  2. Less risk of encountering issue SplittingWriteEventsListener expects that an async source limits recursion depth to 1 #1652.

Motivation:

To mitigate apple#1652 issue, temporary limit the mutual recursion between
`onNext` and `request` to a depth of 1 for `ConcatDeferNextSubscriber`.

Modifications:

- Introduce additional `SINGLE_DELIVERING` state to understand if the
`request` was invoked while we deliver result of the `Single`;
- Remove `boundedDepthOfOnNextAndRequestRecursion()` override from
`SingleConcatWithPublisherDeferSubscribeTckTest`;

Result:

1. `SingleConcatWithPublisher` has maximum recursion depth of 1.
2. Less risk encountering the issue apple#1652.

Signed-off-by: Idel Pivnitskiy <[email protected]>
@idelpivnitskiy
Copy link
Member Author

idelpivnitskiy commented Jul 2, 2021

This was already reviewed in #1643 (see 6032a41). We agreed with @Scottmitch to move this change into a separate PR to revert it later after #1652 is fixed. Will merge after CI passes all checks.

@idelpivnitskiy idelpivnitskiy merged commit b8bc2c1 into apple:main Jul 2, 2021
@idelpivnitskiy idelpivnitskiy deleted the SingleConcatWithPublisher-recursion-depth branch July 2, 2021 01:13
bondolo pushed a commit to bondolo/servicetalk that referenced this pull request Jul 2, 2021
Motivation:

To mitigate apple#1652 issue, temporary limit the mutual recursion between
`onNext` and `request` to a depth of 1 for `ConcatDeferNextSubscriber`.

Modifications:

- Introduce additional `SINGLE_DELIVERING` state to understand if the
`request` was invoked while we deliver result of the `Single`;
- Remove `boundedDepthOfOnNextAndRequestRecursion()` override from
`SingleConcatWithPublisherDeferSubscribeTckTest`;

Result:

1. `SingleConcatWithPublisher` has a maximum recursion depth of 1.
2. Less risk of encountering issue apple#1652.
bondolo pushed a commit to bondolo/servicetalk that referenced this pull request Jul 2, 2021
Motivation:

To mitigate apple#1652 issue, temporary limit the mutual recursion between
`onNext` and `request` to a depth of 1 for `ConcatDeferNextSubscriber`.

Modifications:

- Introduce additional `SINGLE_DELIVERING` state to understand if the
`request` was invoked while we deliver result of the `Single`;
- Remove `boundedDepthOfOnNextAndRequestRecursion()` override from
`SingleConcatWithPublisherDeferSubscribeTckTest`;

Result:

1. `SingleConcatWithPublisher` has a maximum recursion depth of 1.
2. Less risk of encountering issue apple#1652.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant