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 setEnableTransactionSupport is set to true in RedisTemplate,
the behavior of RedisTemplate.hasKey() may differ depending on the version of Spring Data Redis:
In version 2.7.X: hasKey() responds with a valid value.
In version 3.0.X ~ 3.2.X: hasKey() responds with null.
Based on the code debug, it appears that the introduction of RedisTemplate.doWithKeys() may have led to a change in the behavior of ConnectionSplittingInterceptor.intercept() In version 2.7, the invoke method at line 487 is called, while in version 3.0, the invoke method at line 477 is called.
In recent Spring Data Redis documentation, it is mentioned that "Read-only commands" are designed to work well in transactional contexts. However, it's unclear whether the exclusion of the hasKey command from this behavior is intentional or a bug.
I am using spring data redis well. Thank you
The text was updated successfully, but these errors were encountered:
This is a regression we introduced with the new command interface design. In fact, trying to obtain a command interface first breaks ConnectionSplittingInterceptor as ConnectionSplittingInterceptor expects a Redis command invocation instead of the intermediate command interface to be returned.
…eptor`.
We now consider requests to command API objects such as RedisConnection.keyCommands() in ConnectionSplittingInterceptor to identify the correct command and route it accordingly.
Closes: #2886
Original Pull Request: #2887
When
setEnableTransactionSupport
is set to true inRedisTemplate
,the behavior of
RedisTemplate.hasKey()
may differ depending on the version of Spring Data Redis:hasKey()
responds with a valid value.hasKey()
responds with null.Based on the code debug, it appears that the introduction of
RedisTemplate.doWithKeys()
may have led to a change in the behavior ofConnectionSplittingInterceptor.intercept()
In version 2.7, theinvoke
method at line 487 is called, while in version 3.0, theinvoke
method at line 477 is called.In recent Spring Data Redis documentation, it is mentioned that "Read-only commands" are designed to work well in transactional contexts. However, it's unclear whether the exclusion of the hasKey command from this behavior is intentional or a bug.
I am using spring data redis well. Thank you
The text was updated successfully, but these errors were encountered: