Skip to content

clarify meaning of “overflow protection” #66

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

Closed
rkuhn opened this issue Jun 14, 2014 · 11 comments
Closed

clarify meaning of “overflow protection” #66

rkuhn opened this issue Jun 14, 2014 · 11 comments

Comments

@rkuhn
Copy link
Member

rkuhn commented Jun 14, 2014

@benjchristensen proposed

  • A Subscription MUST support an infinite number of calls to request and MUST support a pending request count up to 2^63-1 (java.lang.Long.MAX_VALUE). If more than 2^63-1 are requested in pending then Subscription MUST emit an error to Subscriber.onError.
@viktorklang
Copy link
Contributor

Yes, I cannot see how it could be handled differently, it cannot be silently ignored since the Subscriber is keeping track of the demand it has requested. It is also fail-fast which is good.

I'd like to propose:

  • A Subscription MUST support an infinite number of calls to request and MUST support a pending request count up to 2^63-1 (java.lang.Long.MAX_VALUE). If more than 2^63-1 are requested in pending then it MUST signal an onError with java.lang.IllegalStateException on the given Subscriber. The cause message MUST include a reference to this rule and/or quote the full rule

@viktorklang
Copy link
Contributor

Others? @reactive-streams/contributors

@smaldini
Copy link
Contributor

Not sure, what about maxing out the capacity to Long.MAX instead of throwing an exception ?

@viktorklang
Copy link
Contributor

I thought about that but I don't think it'll work because then the
Publisher and the Subscriber does not agree on the outstanding
demand—there's a divergence and it is unclear what it'd mean in practice.
I think we have to fail fast.

On Sun, Jun 29, 2014 at 12:32 AM, Stephane Maldini <[email protected]

wrote:

Not sure, what about maxing out the capacity to Long.MAX instead of
throwing an exception ?


Reply to this email directly or view it on GitHub
#66 (comment)
.

Cheers,

@mariusae
Copy link

I would omit "infinite number of calls" -- anything involving infinities is bound to become ontological at some point :-) Maybe say: "indefinite number of calls"

@viktorklang
Copy link
Contributor

@mariusaeriksen How about "unbounded"?

@mariusae
Copy link

I like that.

On Jun 30, 2014, at 2:39, Viktor Klang (√) [email protected] wrote:

@mariusaeriksen How about "unbounded"?


Reply to this email directly or view it on GitHub.

@viktorklang
Copy link
Contributor

Time to finalize the votes, if you need more time, please respond here with how much time (reasonable) is needed to cast your vote. @reactive-streams/contributors

@tmontgomery
Copy link

👍 Unbounded added to @viktorklang wording makes sense

@smaldini
Copy link
Contributor

smaldini commented Jul 4, 2014

Happy to merge this.

@benjchristensen
Copy link
Contributor

👍 for the modified text with "unbounded":

A Subscription MUST support an unbounded number of calls to request and MUST support a pending request count up to 2^63-1 (java.lang.Long.MAX_VALUE). If more than 2^63-1 are requested in pending then it MUST signal an onError with java.lang.IllegalStateException on the given Subscriber. The cause message MUST include a reference to this rule and/or quote the full rule.

viktorklang added a commit that referenced this issue Jul 9, 2014
viktorklang added a commit that referenced this issue Jul 9, 2014
Fixes #66 - Moves the rule governing overflow protection (1.18) to (3.17...
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

No branches or pull requests

6 participants