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

Better validation for aeron channel strings. #887

Closed
Tomius opened this issue Mar 11, 2020 · 0 comments
Closed

Better validation for aeron channel strings. #887

Tomius opened this issue Mar 11, 2020 · 0 comments

Comments

@Tomius
Copy link

Tomius commented Mar 11, 2020

The following four aeron channels are treated as completely valid for creating a subscription or a publication:

"aeron:ipcsdfgfdhfgf"
"aeron:udp?endpoint=localhost:4652|-~@{]|=??#s!£$%===="
"aeron:ipc|sparse=true"
"aeron:ipc?sparse=maybe" 

By valid channel I mean that if in this unit test you replace the channel with either of the above, the test will still pass (but it fails if I use "aeron:ipc?term-length=2k" as a channel).

With this error tolerant parsing, the expected and intended behaviour of the system can easily differ significantly without any warning sign. E.g. if someone accidentally makes a channel of aeron:ipc|sparse=true instead of aeron:ipc?sparse=true, then they will get a non-sparse buffer, when their intention was obviously to get a sparse one.
It's not that hard to make a typo in one of the option names or arguments either. I managed to get production issue today because of one. I just would have preferred seeing an exception in the early development phase rather than seeing my prod system behave differently to what I intended.

@Tomius Tomius changed the title Validate aeron channel strings. Better validation for aeron channel strings. Mar 11, 2020
mikeb01 added a commit to mikeb01/Aeron that referenced this issue Mar 13, 2020
mikeb01 added a commit to mikeb01/Aeron that referenced this issue Mar 13, 2020
mikeb01 added a commit to mikeb01/Aeron that referenced this issue Mar 13, 2020
@mjpt777 mjpt777 closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants