-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use Lettuce Redis client; Redis module fixes #2435
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
Conversation
We may consider this for back-porting, especially the fix for |
|
The Lettuce client is based on the Netty and more stable, than Jedis therefore we get a performance improvement for tests (it saves us at about 30 seconds). Also this client doesn't fail for me on Windows sporadically (very often) with the `ConnectionClosedException` * After switching to the Netty-based client, we expose the interrupted Thread issue in the `LockRegistryLeaderInitiator`. If we interrupted (expected behavior), we try to unlock calling `RedisLockRegistry`, but Netty client reject our request because the thread is interrupted, therefore we never delete the lock when we yield our leadership. Fix the issue with shifting a `RedisTemplate.delete()` operation to the `ExecutorService` when the current thread is interrupted * Allow to configure such an `ExecutorService` and timeout to wait for the `submit()` result * Refactor `RedisAvailableRule` and all the Redis tests do not expose the target `RedisConnectionFactory` implementation. * Make all the test-cases based on the `connectionFactory` created by the `RedisAvailableTests.setupConnectionFactory()` * Tweak some unnecessary timeouts and sleeps for better tests task throughput
The Travis is green after the second attempts, but there is indeed something else to do there. |
Do you want a separate PR for back-porting or are you OK to cherry-pick this fully ? |
Before backporting, I think we need to be sure the src/main changes still work with the Jedis library. If you've already done that, we can cherry-pick; if not, we should backport just the src/main changes first. |
I just reverted src/test and build.gradle and the build is green. Attempting cherry-pick... |
* Use Lettuce Redis client; Redis module fixes The Lettuce client is based on the Netty and more stable, than Jedis therefore we get a performance improvement for tests (it saves us at about 30 seconds). Also this client doesn't fail for me on Windows sporadically (very often) with the `ConnectionClosedException` * After switching to the Netty-based client, we expose the interrupted Thread issue in the `LockRegistryLeaderInitiator`. If we interrupted (expected behavior), we try to unlock calling `RedisLockRegistry`, but Netty client reject our request because the thread is interrupted, therefore we never delete the lock when we yield our leadership. Fix the issue with shifting a `RedisTemplate.delete()` operation to the `ExecutorService` when the current thread is interrupted * Allow to configure such an `ExecutorService` and timeout to wait for the `submit()` result * Refactor `RedisAvailableRule` and all the Redis tests do not expose the target `RedisConnectionFactory` implementation. * Make all the test-cases based on the `connectionFactory` created by the `RedisAvailableTests.setupConnectionFactory()` * Tweak some unnecessary timeouts and sleeps for better tests task throughput * Add a `Log4j2LevelAdjuster` into the `RedisLockRegistryLeaderInitiatorTests`
The Lettuce client is based on the Netty and more stable, than Jedis
therefore we get a performance improvement for tests
(it saves us at about 30 seconds).
Also this client doesn't fail for me on Windows sporadically (very often)
with the
ConnectionClosedException
Thread issue in the
LockRegistryLeaderInitiator
.If we interrupted (expected behavior), we try to unlock calling
RedisLockRegistry
, but Netty client reject our request because thethread is interrupted, therefore we never delete the lock when we yield
our leadership.
Fix the issue with shifting a
RedisTemplate.delete()
operation to theExecutorService
when the current thread is interruptedExecutorService
and timeout to wait forthe
submit()
resultRedisAvailableRule
and all the Redis tests do not exposethe target
RedisConnectionFactory
implementation.connectionFactory
created bythe
RedisAvailableTests.setupConnectionFactory()
throughput