Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

are single redis commands executed in isolation?

are single redis commands executed in isolation?

Problem

I'm using Node and Redis.

If I issue a redis.set() Command, is there any chance that whilst that is being set, another read can occur with the old value?

Problem courtesy of: Tim

Solution

No, you will never have that problem. One of the basic virtues of Redis is that it has a tight event loop which executes the commands, so they are naturally atomic.

This page has more on the topic (see subheading "Atomicity"), and about Redis in general.

Solution courtesy of: chisophugis

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

are single redis commands executed in isolation?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×