I'm reading https://redis.io/commands/del docs, but it's not clear to me if the DEL command is atomic on hashes.

Situation: 1. Assume we have a hash with several fields, 2. the first client begins removing the hash, by DEL, 3. another client reads only a part of (a subset of the fields) of the hash value in the meantime, 4. the first client finishes the removal of the hash.

I assume it is an atomic operation in this sense, though I'm not sure what documentation page can be taken as proof.

Comment From: itamarhaber

Hello @praiskup

All Redis operations are atomic due to the server's single thread that writes data. While the server is performing the DEL, all clients are blocked. After it finished deleting the key, subsequent client requests will be processed, and in this case will not return "a subset of fields" as the key will no longer exist.