You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
, with the timeout parameter representing the seconds.
So, without fractional seconds precision, we lost the ability to have timeouts shorter than a second.
Expected behavior
Instead of silently discarding fractional seconds part, which later leads to a misleading error when client is used:
java.lang.IllegalArgumentException: `duration` must be greater than zero
, it would be nice to allow timeouts shorter than a second, by storing the Duration internally and later passing it as is to Mutiny Redis Client.
The alternative is to throw a more precise exception, saying for instance that timeouts shorter than a second, even though they're allowed by the Duration, are not allowed.
To Reproduce
Define a timeout shorter than a second and try using a RedisClient. E.g.:
quarkus.redis.timeout=PT0.1S
The text was updated successfully, but these errors were encountered:
@gsmet and @machi1990, should I close this issue, now that it's fixed by #15211? Also, should the PR be linked to this issue (I don't seem to have the permission to link them)?
Just as an FYI for next time, if you add Fixes: #NNNNN like I have done in the description of your PR, GH will automatically link the PR to the issue :)
Describe the bug
The docs says Redis client timeout is defined as a
Duration
:https://quarkus.io/guides/redis#quarkus-redis-client_quarkus.redis.timeout
A
Duration
object is later passed to an underlying implementation, as can be seen here:quarkus/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/client/runtime/RedisClientImpl.java
Line 1026 in 6dce423
but, internally, only seconds precision is used:
quarkus/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/client/runtime/RedisClientImpl.java
Line 15 in 6dce423
, with the
timeout
parameter representing the seconds.So, without fractional seconds precision, we lost the ability to have timeouts shorter than a second.
Expected behavior
Instead of silently discarding fractional seconds part, which later leads to a misleading error when client is used:
, it would be nice to allow timeouts shorter than a second, by storing the
Duration
internally and later passing it as is to Mutiny Redis Client.The alternative is to throw a more precise exception, saying for instance that timeouts shorter than a second, even though they're allowed by the
Duration
, are not allowed.To Reproduce
Define a timeout shorter than a second and try using a RedisClient. E.g.:
The text was updated successfully, but these errors were encountered: