郭伟光
fae5b1a19d
unblockClient: avoid to reset client when the client was shutdown-blocked ( #10440 )
...
fix #10439 . see https://github.com/redis/redis/pull/9872
When executing SHUTDOWN we pause the client so we can un-pause it
if the shutdown fails.
this could happen during the timeout, if the shutdown is aborted, but could
also happen from withing the initial `call()` to shutdown, if the rdb save fails.
in that case when we return to `call()`, we'll crash if `c->cmd` has been set to NULL.
The call stack is:
```
unblockClient(c)
replyToClientsBlockedOnShutdown()
cancelShutdown()
finishShutdown()
prepareForShutdown()
shutdownCommand()
```
what's special about SHUTDOWN in that respect is that it can be paused,
and then un-paused before the original `call()` returns.
tests where added for both failed shutdown, and a followup successful one.
2022-03-20 15:18:53 +02:00
..
2022-03-15 18:24:40 -07:00
2022-02-03 10:25:37 +02:00
2022-03-15 17:14:53 +02:00
2021-05-03 13:39:07 +03:00
2020-04-08 12:55:57 +02:00
2021-04-26 15:52:06 +03:00
2022-01-30 19:43:37 +02:00
2021-09-02 11:07:51 +03:00
2021-04-26 15:52:06 +03:00
2022-01-18 13:10:07 +02:00
2022-01-18 13:10:07 +02:00
2021-12-19 17:52:23 +02:00
2021-10-06 16:08:13 +03:00
2022-02-23 22:34:58 +02:00
2021-03-10 19:11:16 +02:00
2020-12-13 17:09:54 +02:00
2021-10-10 08:17:54 +03:00
2021-04-29 08:25:10 +03:00
2021-11-11 13:51:33 +02:00
2022-03-20 15:18:53 +02:00
2022-02-13 18:37:32 +02:00
2022-02-13 18:37:32 +02:00
2021-10-06 16:08:13 +03:00
2022-03-09 13:55:17 +02:00
2022-03-05 21:25:52 +02:00
2022-03-16 14:07:24 -07:00
2022-03-15 18:24:40 -07:00
2022-03-15 18:24:40 -07:00
2022-03-10 09:52:49 +02:00
2021-12-28 09:20:10 +02:00
2022-02-22 14:00:37 +02:00
2022-02-22 14:00:37 +02:00
2021-06-10 15:39:33 +03:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2021-06-10 15:39:33 +03:00
2020-04-24 17:11:21 -07:00
2022-03-08 17:10:36 +02:00
2022-03-01 14:40:29 +02:00
2022-02-06 20:13:34 -08:00
2022-03-09 13:58:23 +02:00
2021-12-19 17:52:23 +02:00
2021-12-13 21:16:25 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2022-02-27 13:40:57 +02:00
2022-01-04 13:08:10 +02:00
2022-01-23 10:05:06 +02:00
2021-02-23 12:57:45 +02:00
2022-02-27 13:40:57 +02:00
2022-02-02 15:50:41 +02:00
2022-01-14 14:02:02 +02:00
2021-12-19 17:52:23 +02:00
2022-02-21 08:06:58 +02:00
2021-04-29 08:25:10 +03:00
2020-04-09 17:48:29 +08:00
2022-02-08 16:49:47 +02:00
2022-02-28 10:59:16 +02:00
2021-11-28 11:26:28 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2022-01-23 10:05:06 +02:00
2020-10-27 15:04:18 +02:00
2022-01-06 13:39:38 +02:00
2021-02-16 16:17:38 +02:00
2022-03-09 13:58:23 +02:00
2021-11-24 13:34:13 +02:00
2022-03-09 13:58:23 +02:00
2021-06-10 15:39:33 +03:00
2021-06-10 15:39:33 +03:00
2021-06-10 15:39:33 +03:00
2020-05-05 23:35:08 -04:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2022-01-06 17:59:37 +02:00
2021-11-11 13:51:33 +02:00
2022-03-15 18:21:13 -07:00
2020-08-28 11:54:10 +03:00
2020-08-28 11:54:10 +03:00
2020-12-23 15:52:07 +02:00
2020-12-23 15:52:07 +02:00
2022-02-27 13:40:57 +02:00
2022-03-15 18:21:13 -07:00
2021-06-10 15:39:33 +03:00
2022-01-03 19:14:13 +02:00
2022-01-02 16:54:47 -08:00
2022-01-16 08:54:40 +02:00
2021-12-20 12:31:13 +02:00
2022-03-09 13:58:23 +02:00
2020-09-10 13:43:38 +03:00
2022-02-23 22:34:58 +02:00
2022-02-23 22:34:58 +02:00
2022-03-08 13:10:24 +02:00
2022-02-22 10:09:34 +02:00
2022-01-20 11:10:33 +02:00
2022-03-16 10:11:38 -07:00
2021-11-11 13:51:33 +02:00
2020-12-06 14:54:34 +02:00
2022-03-15 18:21:13 -07:00
2022-03-13 16:19:42 +02:00
2021-08-04 16:28:07 +03:00
2021-08-04 16:28:07 +03:00
2021-12-31 14:08:04 +02:00
2022-02-27 13:40:57 +02:00
2022-02-27 13:40:57 +02:00
2022-03-08 16:53:11 +02:00
2022-01-24 16:50:02 +02:00
2022-01-18 12:52:27 +02:00
2022-01-18 12:52:27 +02:00
2020-12-06 14:54:34 +02:00
2022-03-15 18:38:07 +02:00
2022-03-15 14:18:23 +02:00
2022-03-16 20:26:30 -07:00
2020-10-25 14:14:05 +02:00
2021-02-23 12:57:45 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2021-11-11 13:51:33 +02:00
2021-07-10 10:04:54 -05:00
2021-11-11 13:51:33 +02:00
2021-06-14 16:46:45 +03:00
2021-12-15 21:23:15 +02:00
2022-03-15 17:14:53 +02:00
2020-09-10 13:43:38 +03:00
2022-02-23 22:34:58 +02:00
2022-01-23 10:05:06 +02:00
2022-01-23 10:05:06 +02:00
2021-11-28 11:26:28 +02:00
2022-02-24 08:31:39 +02:00
2022-01-23 10:05:06 +02:00
2022-03-02 10:40:39 +02:00
2021-11-16 08:55:10 +02:00
2020-07-21 08:13:05 +03:00
2022-02-22 14:00:37 +02:00
2022-01-20 13:05:27 -08:00
2022-03-14 08:22:57 +02:00
2022-03-14 08:22:57 +02:00
2020-12-06 14:54:34 +02:00
2020-10-11 17:21:58 +03:00
2022-03-09 13:58:23 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2022-01-19 20:56:12 +02:00
2022-01-05 14:01:05 +02:00