How does redis ensure asynchronous set data in nodejs environment, so that the data will not be overwritten?

uses express as the server-side framework, and then uses redis to store some data.

I found a problem, but I couldn"t figure it out.

for example, A sends an ajax request at time 2 redis 31v 11v 00, this request modifies some data in redis, and B sends an ajax request to modify some data in redis when time 2v 31v 11v 02.

so the server starts the following operation

2JV 31VlV 1100 POST updateData user = A;
2JV 31VlV 11JV 01 POST updateData user = B;
2Rver 31JV 11VO1Rver pulling a collection in redis (A"s request);
2JV 31JV 1102 server pulling a set in redis (B"s request);
2JJR 31POST updateData user 1102 server the data about user An in this collection has been modified;
2Remo31JUR 11R03 server"s data about user B in this set has been modified
2 the modified A data set is updated again to the redis by
2 the modified A data set;
2 the modified B data set is re-updated to the redis by the
2VOV 31VO1VO4 server;

in this way, doesn"t the data on redis become modified only by B, but not by A?

nodejs is a single thread to execute code, does it mean that if A.B requests before and after, first deal with A, and then deal with B?

Jun.18,2022

https://youyu4.iteye.com/blog...
read it again. There is something wrong with my understanding (as mongodb). Your understanding is fine. It can be roughly understood as localStorage.
the design table is to design key, and the table should be designed like this

.
{
    "room:1:seat1:ready":true,
    "room:1:seat1:userid":1,
    "room:1:seat2:ready":false,
    "room:1:seat2:userid":2,
    ...
}

you see here the key that stores the readiness status of seat1 and seat2 is different, so there will be no conflict

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37ff8-4111c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37ff8-4111c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?