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

Zero values for some properties are invalid or unspecified #1433

Closed
dhobsd opened this issue Oct 20, 2023 · 2 comments · Fixed by #1443
Closed

Zero values for some properties are invalid or unspecified #1433

dhobsd opened this issue Oct 20, 2023 · 2 comments · Fixed by #1443
Assignees
Labels

Comments

@dhobsd
Copy link

dhobsd commented Oct 20, 2023

This is a super nit, but the definitions in Interface for Numeric and Integer specify that they take "positive or negative ... values". Although IEEE754 has the concept of positive and negative zero, this idea is not relevant to any of the TAPS specification. Maybe useful to "fix" these definitions to be inclusive of zero.

In working on #1428, I had to do a double-take to see whether we discuss zero anywhere. In doing so, I noticed that zero is implicitly valid for all of our Numeric and Integer options (as they all specify "non-negative"), but only some of them specify what a zero value means for that property.

In some cases, a value of zero is nonsensical. For example, the only logical (to me) behavior for a zero value for connTimeout and keepAliveTimeout would be for those fields to be Disabled. However, Disabled is implicitly an option for an implicitly enumerated type, and is distinct from the zero value. These two properties ought to say "Integer (positive)" or explicitly define a zero value as erroneous.

Further cases:

I have attempted to be comprehensive, but I am not sure this is every case.

@mwelzl mwelzl added the API label Oct 22, 2023
@mwelzl mwelzl self-assigned this Nov 1, 2023
@mwelzl
Copy link
Contributor

mwelzl commented Nov 1, 2023

Many thanks for this, great catch!

@mwelzl
Copy link
Contributor

mwelzl commented Nov 1, 2023

I created #1443 to address this. I think it was easy not to miss anything, I just did a search for "Integer" and "Numeric"... so I think this is complete now. A few answers (and I agree with everything else, as the PR should reflect):

  • About timeouts: yep, positive only.
  • What does zero mean for Bounds on Send or Receive Rate? Theoretically, zero may seem to be a good allowed value for minima only, but this is inconsistent: we have Unlimited as a special value for all four bounds, and clearly an Unlimited minimum means "as small as zero".
  • UTO: yep, I had to dig, too. Since this is an Integer, "Positive" should do the trick ( >= 1 :-) )
  • Lifetime: you got me thinking a bit with this one... semantically, 0 seems to convey "don't delay this, send it immediately!". I checked SCTP, where this originally comes from: 0 doesn't seem to be specified there. However, the functionality that this represents is: "throw away a message if the lifetime has expired". It's not really a means to declare urgency - and so I felt that defining 0 seems out of place here (that's like inventing new functionality, and if I want stuff to be sent right away, I should probably control the send buffer instead using the "Receive queuing" system).

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

Successfully merging a pull request may close this issue.

2 participants