I am trying to use the Redis command setto implement the simplest distributed locking component, but I cannot find any exact basis for atomicity through the white paper, is the Redis command an SET key value [EX seconds] [PX milliseconds] [NX|XX]atomic operation?
set
SET key value [EX seconds] [PX milliseconds] [NX|XX]
Yes. The kernel is single-threaded, so nothing will be executed until SETit finishes; making SET {key} {value} EX {expiry} NXideal for easy locking.
SET
SET {key} {value} EX {expiry} NX
Source: https://habr.com/ru/post/1674222/More articles:why do javascript arguments have a length property and other objects don't? - javascriptMultiple use of setdiff () for consecutive groups without loops - rHTTP 429 from Microsoft Graphics API Requests - microsoft-graphAre there any one-way binding performance benefits in Angular 1 - angularjsHow to load CSV with timestamps in custom format? - apache-sparkSpring Oauth2 Authorization_Grant - Unable to access resources after token - User anonymously - javaAngular router gets child parameter from root component - javascriptAngular 2 Animation Won't Work - angularGoogle Cloud Speech API Request Request Error - google-cloud-platformDo compilers usually use registers for their "intended" purpose? - assemblyAll Articles