shard: add error message for invalid weight
This was brought up by Dridi in an email response to b90b60d0: Initially, I also thought that we should VRT_fail() for an invalid parameter, but on second thought I realized that, as the shard director supports request-time reconfiguration, graceful error handling should be possible, so VRT_fail() is too hard. I think that even returning false for .add_backend() is too harsh, as an invalid weight is probably not too much of an issue to abort the reconfiguration in the case of caller error handling. That said, this might all be over the top. But I really do not want to run into the (still unfixed) case I saw recently trying to base64 decode an invalid input, which is not possible to handle gracefully.
Showing
Please register or sign in to comment