Are incrementing integers the only atomic operations?

100 views
Skip to first unread message

S Ahmed

unread,
Mar 1, 2011, 2:42:46 PM3/1/11
to redi...@googlegroups.com
Is the only operation that is atomic incrementing a integer value?

How about adding items to lists/sets?

Jeremy Zawodny

unread,
Mar 1, 2011, 2:45:14 PM3/1/11
to redi...@googlegroups.com, S Ahmed
No.  All redis operations are atomic.

Jeremy

On Tue, Mar 1, 2011 at 11:42 AM, S Ahmed <sahme...@gmail.com> wrote:
Is the only operation that is atomic incrementing a integer value?

How about adding items to lists/sets?

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

Josiah Carlson

unread,
Mar 1, 2011, 3:04:45 PM3/1/11
to redi...@googlegroups.com, Jeremy Zawodny, S Ahmed
To be more precise, all individual operations within Redis are atomic.
Multiple operations can be grouped together and made atomic via
MULTI/EXEC. You can get a sort of optimistic locking via
WATCH/MULTI/EXEC.

- Josiah

Reply all
Reply to author
Forward
0 new messages