Database / REDIS
Explain the execution flow of a Redis transaction using MULTI/EXEC?
Unlike a database transaction that begins actual execution immediately, a Redis MULTI block queues commands on the client's connection without running them, and only EXEC triggers the whole batch to actually execute, uninterrupted.
The key nuance for interviews: a runtime error (like incrementing a key that holds a string) is different from a syntax error — runtime errors are only discovered during execution in step J, and don't stop the remaining queued commands from still running, since Redis doesn't inspect a command's effect on data until it actually executes it.
More Related questions...
