Binbin
5166d489da
Correctly recode client infomation to the slowlog when runing script (#805)
Currently when we are runing a script, we will passing a fake client.
So if the command executed in the script is recoded in the slowlog,
the client's ip:port and name information will be empty.
before:
```
127.0.0.1:6379> client setname myclient
OK
127.0.0.1:6379> config set slowlog-log-slower-than 0
OK
127.0.0.1:6379> eval "redis.call('ping')" 0
(nil)
127.0.0.1:6379> slowlog get 2
1) 1) (integer) 2
2) (integer) 1721314289
3) (integer) 96
4) 1) "eval"
2) "redis.call('ping')"
3) "0"
5) "127.0.0.1:61106"
6) "myclient"
2) 1) (integer) 1
2) (integer) 1721314289
3) (integer) 4
4) 1) "ping"
5) ""
6) ""
```
after:
```
127.0.0.1:6379> client setname myclient
OK
127.0.0.1:6379> config set slowlog-log-slower-than 0
OK
127.0.0.1:6379> eval "redis.call('ping')" 0
(nil)
127.0.0.1:6379> slowlog get 2
1) 1) (integer) 2
2) (integer) 1721314371
3) (integer) 53
4) 1) "eval"
2) "redis.call('ping')"
3) "0"
5) "127.0.0.1:51983"
6) "myclient"
2) 1) (integer) 1
2) (integer) 1721314371
3) (integer) 1
4) 1) "ping"
5) "127.0.0.1:51983"
6) "myclient"
```
Signed-off-by: Binbin <binloveplay1314@qq.com>
2024-08-10 23:46:56 +08:00
..
2024-07-31 16:52:20 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-04-10 10:18:47 -04:00
2024-04-16 21:17:38 +02:00
2024-06-07 01:40:55 +02:00
2024-07-17 13:59:33 -07:00
2024-04-09 10:24:03 +02:00
2024-05-28 15:01:28 -04:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-04-25 15:13:21 +08:00
2024-06-07 01:40:55 +02:00
2024-04-25 15:13:21 +08:00
2024-04-23 10:51:53 -07:00
2022-02-08 13:14:42 +02:00
2024-07-14 20:04:47 -07:00
2024-04-25 15:13:21 +08:00
2024-07-17 13:59:33 -07:00
2024-04-15 14:25:33 +02:00
2023-08-27 11:42:55 +03:00
2021-11-02 16:42:53 +02:00
2024-04-09 10:38:09 -04:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-07-03 21:27:45 +02:00
2024-04-18 15:57:17 +02:00
2024-04-09 10:38:09 -04:00
2024-03-05 14:42:28 +02:00
2024-04-25 15:13:21 +08:00
2024-06-07 01:40:55 +02:00
2024-04-25 15:13:21 +08:00
2024-04-25 15:13:21 +08:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2023-06-12 14:05:34 +03:00
2024-04-10 10:18:47 -04:00
2024-05-17 13:35:31 +02:00
2024-07-22 10:33:10 +02:00
2024-04-09 10:38:09 -04:00
2024-08-10 23:46:56 +08:00
2024-04-09 10:24:03 +02:00
2024-04-18 15:57:17 +02:00
2024-04-10 10:18:47 -04:00
2022-04-24 17:29:35 +03:00
2024-07-22 10:33:10 +02:00