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
Configuration validation exceptions must tell validation rules/values #67
Comments
This problem is split over two layers/projects: Core and EmbeddedConfiguration. The "Nonsensical ..." point was a problem in the core project. More specifically, the following types now have "Validation" sub-type using a unified pattern for validating parameters. The following types just check for non-null values, so I left them with simple notNull(...) checks: See next comment for the second aspect. |
The other problems (with "Invalid file size") are located in the EmbeddedConfiguration project. |
Adapted validators in EmbeddedConfiguration project. |
File sizes without suffix are now interpreted as bytes. |
Retest:
2147483647: a little nonsense, the maximum size is given in negative numbers, and I did not specify it.
|
There's a copy&paste error in the exception for the maximum size check:
However, since |
Fixed copy&paste error, and also parameter mixup in configuration layer. |
Okay, I was confused: The exception message was about the "smaller" case, not the case I pasted the code snippet for. edit: Ah, FH already fixed my stupidity before my comment. |
Ok, test successful. |
Our Documentation in page:
https://manual.docs.microstream.one/data-store/configuration/properties
says:
Minimum file size in bytes of a storage file to avoid merging with other files during housekeeping.
Must be greater than 1, maximum is 2GB.
It should be there, which format should be used.
When i write: 500
I received:
one.microstream.storage.exceptions.StorageExceptionInvalidConfiguration: Invalid file size: 500
Why is this number invalid?
When i write 10Mb
I received:
java.lang.IllegalArgumentException: Nonsensical size limits: min file size = 10000000, max file size = 8388608
I would write: Min size limit cannot be higher as actual max size limit. This number has many '0', its hard to read it.
Ok, I write: 20000000
I received:
one.microstream.storage.exceptions.StorageExceptionInvalidConfiguration: Invalid file size: 20000000
Why is this number invalid?
I write: 5kb
dann passt.
(previous edit was from ZJ via my computer during a meeting)
The text was updated successfully, but these errors were encountered: