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
When a RedisCommandTimeoutException happens it is possible (depending on CPU task scheduling) that the timeout error will be triggered after the underlying command is completed thus violating reactive spec. Futhermore, this error causes the DefaultEventExecutor to terminate which leaves most subsequent Redis commands in a stuck state when publishOnScheduler(true).
No violation of reactive stream spec, no terminated executor, no stuck Redis commands
Environment
Lettuce version: 5.3.5.RELEASE
Redis version: any
Possible Solution
As pointed out by @mp911de SubscriptionCommand and CommandWrapper do not ensure single completion. Fixing that will fix this issue.
The text was updated successfully, but these errors were encountered:
mp911de
changed the title
Possible reactive stream spec violation when using command timeout
Reactive stream spec violation when using command timeout
Jan 11, 2021
We now ensure that CommandWrapper and its subclass SubscriptionCommand trigger only a single completion signal. Previously, a race could happen inside the completion notification which could cause a completion and error signal or error + completion because of improper guarding.
We now ensure that CommandWrapper and its subclass SubscriptionCommand trigger only a single completion signal. Previously, a race could happen inside the completion notification which could cause a completion and error signal or error + completion because of improper guarding.
We now ensure that CommandWrapper and its subclass SubscriptionCommand trigger only a single completion signal. Previously, a race could happen inside the completion notification which could cause a completion and error signal or error + completion because of improper guarding.
Bug Report
Related issue: #1274
Current Behavior
When a
RedisCommandTimeoutException
happens it is possible (depending on CPU task scheduling) that the timeout error will be triggered after the underlying command is completed thus violating reactive spec. Futhermore, this error causes theDefaultEventExecutor
to terminate which leaves most subsequent Redis commands in a stuck state whenpublishOnScheduler(true)
.Stack trace
Input Code
https://github.com/martin-tarjanyi/lettuce-executor-reject-repro
Expected behavior/code
No violation of reactive stream spec, no terminated executor, no stuck Redis commands
Environment
Possible Solution
As pointed out by @mp911de
SubscriptionCommand
andCommandWrapper
do not ensure single completion. Fixing that will fix this issue.The text was updated successfully, but these errors were encountered: