-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Exeption on zpopmin #3199
Comments
Hey @nicolube , I am not able to reproduce the issue with the sample code you've provided.
It also seems that you are using the connection for pub/sub? |
Hey @tishun , Sorry about that, I updated the sample above with a complete one. |
* Handle Null values better when working with JSON * Incomplete submit after some refactoring * Sanitize the CI output when running on CI * Plishing * Never submit irrelevant changes in your PR
My bad, got really confused with some PRs |
@nicolube for the time being you can have a (different) dedicated connection for pubsub, because the issue only manifests in pub/sub connections, e.g. import io.lettuce.core.RedisClient
import io.lettuce.core.codec.RedisCodec
import io.lettuce.core.codec.StringCodec
fun main() {
val client = RedisClient.create("redis://localhost")
val connectionPubSub = client.connectPubSub(RedisCodec.of(StringCodec.ASCII, StringCodec.UTF8)).sync()
val connectionScored = client.connect(RedisCodec.of(StringCodec.ASCII, StringCodec.UTF8)).sync()
connectionScored.zadd("myzset", 1.0, "one")
connectionScored.zadd("myzset", 2.0, "two")
connectionScored.zpopmin("myzset", 1).firstOrNull()?.takeIf { it.hasValue() }?.let {
println("Popped value: $it")
} ?: println("No value to pop")
} |
Bug Report
Current Behavior
I encoutered an exeption while poping something from an sorted set.
Stack trace
Input Code
Input Code
Expected behavior/code
Well I expect it to not throw an exeption.
Environment
Possible Solution
Well currently i do this:
But that is just my workaround.
Additional context
The text was updated successfully, but these errors were encountered: