Open LucHeart opened 4 days ago
Thanks. Do you know if database id in select can actually change during MULTI?
we can definitely relax this restriction if database id has already been 0, or the same ID before any select in MULTI
especially SELECT 0 - indeed, it's a low effort to allow
No I dont think it can change. _connectionMultiplexer.GetDatabase()
gets the database you desire. Defaults to 0 here, after that point it cannot switch database anymore.
Well technically you can send a raw query but i dont think we need to worry about that. Not even sure if multi does support multiple databases in a single transaction
Describe the bug Im trying to use Dragonfly DB with StackExchange.Redis, which is the most popular redis library for C#. However transactions do not work at all. After some debugging, I figured out the core issue. The issue is that dragonflydb doesnt seem to allow SELECT during MULTI. Dont ask me why it does that, but it does.
The command that SE.Redis sends is for example
To Reproduce in CLI Steps to reproduce the behavior:
MULTI
SELECT 0
(You can already see the error message)EXEC
to see the final error message that the library also responds withExpected behavior SELECT should be allowed in transactions, especially
SELECT 0
Screenshots DragonFly logs
Wireshark capture
Environment (please complete the following information):
uname -a
Reproducible Code Snippet
Additional context This also affects libraries that build upon StackExchange.Redis like Redis.OM, this is where I encountered the bug the first time.