Skip to content
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

FEATURE: Support lettuce 6.5.0 #62

Open
mmoayyed opened this issue Nov 1, 2024 · 5 comments
Open

FEATURE: Support lettuce 6.5.0 #62

mmoayyed opened this issue Nov 1, 2024 · 5 comments

Comments

@mmoayyed
Copy link

mmoayyed commented Nov 1, 2024

Lettucemod 4.2.1 at the moment is built against Lettuce 6.4. Supporting Lettuce 6.5 will require some work given some APIs have changed. At the moment, using Lettuce 6.5 presents the following error:

Caused by: java.lang.NoSuchMethodError: 'void io.lettuce.core.StatefulRedisConnectionImpl.<init>(io.lettuce.core.RedisChannelWriter, io.lettuce.core.protocol.PushHandler, io.lettuce.core.codec.RedisCodec, java.time.Duration)'
	at com.redis.lettucemod.StatefulRedisModulesConnectionImpl.<init>(StatefulRedisModulesConnectionImpl.java:41) ~[lettucemod-4.1.2.jar:4.1.2]
	at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:249) ~[lettucemod-4.1.2.jar:4.1.2]
	at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:48) ~[lettucemod-4.1.2.jar:4.1.2]
	at io.lettuce.core.RedisClient.connectStandaloneAsync(RedisClient.java:290) ~[lettuce-core-6.5.0.RELEASE.jar:6.5.0.RELEASE/7f455ec]
	at io.lettuce.core.RedisClient.connect(RedisClient.java:220) ~[lettuce-core-6.5.0.RELEASE.jar:6.5.0.RELEASE/7f455ec]
	at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:198) ~[lettucemod-4.1.2.jar:4.1.2]
	at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:183) ~[lettucemod-4.1.2.jar:4.1.2]

The constructor in question has changed its signature to the following:

public StatefulRedisConnectionImpl(RedisChannelWriter writer, PushHandler pushHandler, RedisCodec<K, V> codec, Duration timeout, 
	Mono<JsonParser> parser) {
}

If you'd like to see a pull request, please let me know.

@mmoayyed mmoayyed changed the title FEATURE: Support lettuce 3.5.0 FEATURE: Support lettuce 6.5.0 Nov 4, 2024
@orkwizard
Copy link

Would be nice to have the PR

@tishun
Copy link

tishun commented Nov 18, 2024

Actually I think that we need to support the existing API and this is more of a regression in Lettuce 6.5.0

I will log another issue to research if we can add the missing constructor in 6.5.1

@mmoayyed
Copy link
Author

mmoayyed commented Dec 4, 2024

Lettuce 6.5.1 now produces the following:

java.lang.NoSuchMethodError: 'void io.lettuce.core.RedisAsyncCommandsImpl.<init>(io.lettuce.core.api.StatefulRedisConnection, io.lettuce.core.codec.RedisCodec)'
	at com.redis.lettucemod.RedisModulesAsyncCommandsImpl.<init>(RedisModulesAsyncCommandsImpl.java:75)
	at com.redis.lettucemod.StatefulRedisModulesConnectionImpl.newRedisAsyncCommandsImpl(StatefulRedisModulesConnectionImpl.java:50)
	at com.redis.lettucemod.StatefulRedisModulesConnectionImpl.newRedisAsyncCommandsImpl(StatefulRedisModulesConnectionImpl.java:30)
	at io.lettuce.core.StatefulRedisConnectionImpl.<init>(StatefulRedisConnectionImpl.java:104)
	at io.lettuce.core.StatefulRedisConnectionImpl.<init>(StatefulRedisConnectionImpl.java:84)
	at com.redis.lettucemod.StatefulRedisModulesConnectionImpl.<init>(StatefulRedisModulesConnectionImpl.java:41)
	at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:249)
	at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:48)
	at io.lettuce.core.RedisClient.connectStandaloneAsync(RedisClient.java:290)
	at io.lettuce.core.RedisClient.connect(RedisClient.java:220)
	at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:198)
	at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:183)

@tishun
Copy link

tishun commented Dec 4, 2024

My bad, will try to go over all the changes this time, tracked in redis/lettuce#3070

@mmoayyed
Copy link
Author

mmoayyed commented Dec 4, 2024

Thank you sir. If/when you have a SNAPSHOT ready for lettuce, I am happy to test with the changeset and report live feedback before the final release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants