Daniel Waterworth
1fdba2c5b2
FIX: Harden DistributedMutex
...
Threadsafety
Since we use the same redis connection in multiple threads, a rogue
transaction in another thread can trample the connection state
(watched keys) that we need to acquire and release the lock properly.
This is fixed by preventing other threads from using the connection
when we are performing these actions.
Off-by-one error
A distributed mutex is now consistently determined to be expired if
the current time is strictly greater than the expire time.
Unwatch before transaction
Since the redis connection is used by so much of the code, it is
difficult to ensure that any watched keys have been cleared. In order
to defend against this rogue connection state, an unwatch has been
added before locking and unlocking.
Logging
Hopefully this log message is more clear.
2019-10-02 13:00:41 +00:00
..
2019-08-21 15:47:44 +02:00
2019-10-02 14:01:53 +10:00
2019-06-21 11:00:28 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-02-11 12:32:04 +00:00
2019-10-02 14:54:08 +10:00
2019-10-02 14:01:53 +10:00
2019-06-20 11:30:09 +02:00
2019-05-13 09:31:32 +08:00
2019-08-07 19:10:50 +02:00
2019-10-02 14:54:08 +10:00
2019-10-02 14:01:53 +10:00
2019-09-06 07:44:12 -04:00
2019-01-21 10:12:23 +01:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:50:54 +10:00
2019-07-04 11:37:37 +02:00
2019-09-20 10:48:59 +01:00
2019-08-09 11:39:46 +02:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2018-10-12 17:03:47 +11:00
2019-07-02 11:22:01 +10:00
2019-05-27 16:39:56 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-09-02 07:25:41 +01:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-09 11:58:15 +03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-06-03 12:13:32 +10:00
2019-08-13 01:13:08 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-15 11:24:20 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-28 11:45:12 +10:00
2019-05-13 09:31:32 +08:00
2019-08-22 08:39:10 +05:30
2019-08-20 22:09:52 +05:30
2019-10-02 14:01:53 +10:00
2019-07-25 12:46:16 -04:00
2019-05-13 09:31:32 +08:00
2019-09-17 09:54:55 +01:00
2019-05-13 09:31:32 +08:00
2018-10-15 15:01:45 -04:00
2019-05-13 09:31:32 +08:00
2019-10-02 13:00:41 +00:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-01 16:24:09 +08:00
2019-05-13 09:31:32 +08:00
2019-08-07 16:39:58 +05:30
2019-09-12 13:21:33 -03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2014-03-11 03:18:57 -04:00
2019-04-29 16:41:35 +08:00
2019-05-13 09:31:32 +08:00
2019-07-18 11:55:49 +02:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:50:54 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-27 13:17:07 +02:00
2019-05-22 17:39:44 +03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-09-12 10:41:50 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-06-27 01:45:52 +02:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-06-07 01:26:06 +02:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-08-30 10:27:52 -03:00
2019-08-27 09:09:00 -03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-09-12 15:55:45 +01:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-06 16:07:49 +02:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-02 07:57:27 +05:30
2019-08-23 17:59:31 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-05-20 13:47:20 +02:00
2019-05-13 09:31:32 +08:00
2019-07-16 12:45:15 +02:00
2019-05-31 14:49:59 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-08-15 13:41:06 -04:00
2018-06-07 14:21:33 +10:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-06-27 13:26:48 +10:00
2019-10-02 14:01:53 +10:00
2019-08-29 12:41:14 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:57:36 +10:00
2019-05-13 09:31:32 +08:00
2019-10-01 20:33:09 +02:00
2019-10-01 16:51:36 -04:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00