Does Redis lock during write?(转载)

问:


I tried to find out but I don't sure that is Redis MVCC? Does Redis allow reading during writing?

答:


Redis is single-threaded. All commands are atomic. While command is running, no other command can be executed. But since everything is in memory, commands are (normally) pretty fast.
So no, redis does not allow reading during writing, but that's not a problem.

另一篇介绍Redis单线程的帖子:

Redis is single-threaded, then how does it do concurrent I/O?

原文链接

原文地址:https://www.cnblogs.com/OpenCoder/p/12886104.html