kreds
kreds copied to clipboard
ERR syntax error on SetOption ULong options
SetOption throws KredsRedisDataException every time I use ULong options. Example:
newClient(Endpoint.from("127.0.0.1:${redis.firstMappedPort}")).use { client ->
client.set("key", "val", SetOption.Builder(exSeconds = 30u).build())
...
ERR syntax error
io.github.crackthecodeabhi.kreds.protocol.KredsRedisDataException: ERR syntax error
at app//io.github.crackthecodeabhi.kreds.protocol.CommandProcessor.decode(Command.kt:69)
at app//io.github.crackthecodeabhi.kreds.connection.AbstractKredsClient$execute$suspendImpl$$inlined$withReentrantLock$2.invokeSuspend(ExclusiveObject.kt:49)
(Coroutine boundary)
at io.github.crackthecodeabhi.kreds.connection.AbstractKredsClient.execute$suspendImpl(Client.kt:151)
client.expire("key", 30u)
works without issues.
Library version: 0.7 Redis server: redis:6.2.7-alpine Kotlin 1.6.10
@istarion thanks for reporting, right now, the work around is as your described, using expire command explicitly.
I have marked this to be fixed in 0.8 release.
Fixed in https://github.com/crackthecodeabhi/kreds/pull/31