Chen Tianjie 897c3d522c
Add CLIENT NO-TOUCH for clients to run commands without affecting LRU/LFU of keys (#11483)
When no-touch mode is enabled, the client will not touch LRU/LFU of the
keys it accesses, except when executing command `TOUCH`.
This allows inspecting or modifying the key-space without affecting their eviction.

Changes:
- A command `CLIENT NO-TOUCH ON|OFF` to switch on and off this mode.
- A client flag `#define CLIENT_NOTOUCH (1ULL<<45)`, which can be shown
  with `CLIENT INFO`, by the letter "T" in the "flags" field.
- Clear `NO-TOUCH` flag in `clearClientConnectionState`, which is used by `RESET`
  command and resetting temp clients used by modules.
- Also clear `NO-EVICT` flag in `clearClientConnectionState`, this might have been an
  oversight, spotted by @madolson.
- A test using `DEBUG OBJECT` command to verify that LRU stat is not touched when
  no-touch mode is on.
 

Co-authored-by: chentianjie <chentianjie@alibaba-inc.com>
Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
Co-authored-by: sundb <sundbcn@gmail.com>
2023-02-23 09:07:49 +02:00
..
2012-04-13 17:52:33 -07:00
2022-11-23 17:39:08 +02:00
2022-08-22 15:01:40 +08:00
2022-08-22 15:01:40 +08:00
2023-02-12 09:23:29 +02:00
2023-02-12 09:23:29 +02:00
2020-04-24 17:11:21 -07:00
2023-01-11 09:59:24 +01:00
2022-11-09 19:50:07 +02:00
2022-11-09 19:50:07 +02:00
2022-03-09 13:58:23 +02:00
2020-05-05 23:35:08 -04:00
2022-08-23 12:37:56 +03:00
2022-04-17 15:43:22 +03:00
2023-01-11 09:59:24 +01:00
2014-08-08 10:05:32 +02:00
2022-10-02 13:56:45 +03:00
2023-02-12 09:23:29 +02:00
2023-01-11 09:59:24 +01:00
2022-08-23 12:37:56 +03:00
2023-02-12 09:23:29 +02:00
2023-02-12 09:23:29 +02:00
2021-07-10 10:04:54 -05:00
2014-07-02 16:31:22 +02:00
2022-07-18 10:56:26 +03:00
2023-01-22 16:32:20 +02:00
2023-02-12 09:23:29 +02:00