We have an application utilizing Spring WebFlux which uses Project Reactor. I ran BlockHound evaluation for the application and it reported java.io.RandomAccessFile.readBytes blocking calls in such libraries like hibernate-validator, orika mapper. hibernate-validator reads error messages from its ValidationMessages.properties file. How severe is the negative impact of this blocking call (that just read a message from property file) for a reactive application? Could it be ignored or should we find the non-blocking solution for this validation?
Unfortunately there's no quick answer here - it depends, you'd have to look at the use of RandomAccessFile.readByte() in each library, and deem if it's acceptable or not.
In general:
If hibernate-validator is genuinely only using this to read a properties file, then this likely falls under the first category so isn't an issue. I would be cautious of that however, as it seems a bit odd that a properties file is being loaded as a RandomAccessFile, they're usually read sequentially - so I'd at least double-check that to make sure it's what's really happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With