`SMISMEMBER` is a unknown command for `ConnectionSplittingInterceptor`
Closed this issue · 8 comments
RedisTemplate.opsForSet().isMember(K key, Object... objects) 호출 시, Issue와 같은 문제가 발생합니다.
Thanks for the report. Please note that this issue tracker communication is English. Below is the translated description:
I'm using Spring-data-redis 2.7.12. When Transactional is enabled, SMISMEMBER isn't registered with RedisCommand, so even though it's a read command, it returns RedisCommand.UNKOWN, which returns null as the result value. (RedisConnectionUtils > ConnectionSplittingInterceptor > intercept Method)
Thank you @SunghyunKim9744. The SMISMEMBER command is recognized as such and executed returning the expected result. Unfortunately it seems the result is dismissed right after when adding conversion for future results for string based redis connections.
Thank you @christophstrobl
SMISMEMBER는 RedisCommand에 등록되지 않아서 queue로 들어가고 있습니다. SISMEMBER는 RedisCommand에 있어서 queue로 들어가지 않고, 별도의 Connection에서 즉시 조회가 가능한게 아닌가요?
@SunghyunKim9744 as @mp911de already mentioned please use English for communication. Below, one more time the translated comment:
SMISMEMBER is not registered in RedisCommand, so it is being queued. Since SISMEMBER is in RedisCommand, isn't it possible to retrieve it immediately through a separate connection without being queued?
SISMEMBER can be found in RedisCommand since its inception 11 years ago. If you see it not being treated correctly, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem (again, please translate eventual comments etc. to English).
@christophstrobl
I'm sorry I didn't write it in English.
The query command I mentioned is a smismember command that originated in Redis 7, not a sismember.
In Spring Redis, I understand that when Transaction is enabled, the write command executes the command in Multi~Exec, but I understand that the read command executes the command immediately through a separate connection.
Read commands such as GET, HGET, SISMEMBER work as I expected even if Transaction is enabled.
However, SMISMEMBER is not running immediately, even though it is a read command.
As a result of debug, it seems that there is no SMISMEMBER in the process of checking the read command in Rediscommand.class, so it returns Rediscommand.UNKNOWN and is recognized as a write command.
I uploaded the log result and the code to test together.
Please check the 2nd test, 'TX - sMIs Member' txSMIsMember() Method.
thanks for clarification 👍 - well update RedisCommands, there's a couple of other commands missing as well
@christophstrobl Hello! I was wondering if it would be okay for me to contribute to this issue and open a PR for it?
