1.Algorithm
2.Review
Mainly on the redis lua scripts debugger code LDB
The main function
It uses a server - client model, redis server acts as a debug server, redis-cli acts as a client, of course, possible to develop other client by following redis-server protocol,
Each new debugging session is forked session, and application server does not block or multiple concurrent debugging sessions. The results will be rolled back, and the original data remains consistent after the debugging session
Can be changed according to the needs of the session synchronization session, in order to preserve modifications to the data set, in this mode, the server will prevent the session is active.
Support for dynamic and static breakpoints, step, debug script logged to the console.
Check the lua variables, there are tracking redis command script execution, print and redis lua values, infinite loop detection and long execution, simulation breakpoint.
3.Tip
Contrast KEYS command, although SCAN-time can not return all matching results, but to avoid the high risk of clogging the system, which also allows some operations may be placed on the primary node execution
SCAN cursor [MATCH pattern] [COUNT count]
scan 0 match DL* count 5
4.Share
https://mp.weixin.qq.com/s/usCiitzA2fb6qXMhilZFrQ
Http pavement on a few questions