Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is MGET atomic?

Tags:

redis

If I fetch the value of multiple keys with MGET, is it guaranteed that nothing will be able to modify any of the keys requested while the command is being processed and until redis returns them? The documentation unfortunately says nothing about the atomicity of this command.

like image 790
Mahn Avatar asked Feb 06 '15 23:02

Mahn


People also ask

Is Redis set atomic?

Redis transaction is also atomic. Atomic means either all of the commands or none are processed.

What is get in Redis?

Redis GET command is used to get the value stored in the specified key. If the key does not exist, then nil is returned. If the returned value is not a string, then error is returned.


1 Answers

Yes - MGET is atomic. All of Redis' commands are.

like image 100
Itamar Haber Avatar answered Dec 03 '22 09:12

Itamar Haber