valkey/tests/support
zhaozhao.zz 78bef6e1fe
optimize(remove) usage of client's pending_querybuf (#10413)
To remove `pending_querybuf`, the key point is reusing `querybuf`, it means master client's `querybuf` is not only used to parse command, but also proxy to sub-replicas.

1. add a new variable `repl_applied` for master client to record how many data applied (propagated via `replicationFeedStreamFromMasterStream()`) but not trimmed in `querybuf`.

2. don't sdsrange `querybuf` in `commandProcessed()`, we trim it to `repl_applied` after the whole replication pipeline processed to avoid fragmented `sdsrange`. And here are some scenarios we cannot trim to `qb_pos`:
    * we don't receive complete command from master
    * master client blocked because of client pause
    * IO threads operate read, master client flagged with CLIENT_PENDING_COMMAND

    In these scenarios, `qb_pos` points to the part of the current command or the beginning of next command, and the current command is not applied yet, so the `repl_applied` is not equal to `qb_pos`.

Some other notes:
* Do not do big arg optimization on master client, since we can only sdsrange `querybuf` after data sent to replicas.
* Set `qb_pos` and `repl_applied` to 0 when `freeClient` in `replicationCacheMaster`.
* Rewrite `processPendingCommandsAndResetClient` to `processPendingCommandAndInputBuffer`, let `processInputBuffer` to be called successively after `processCommandAndResetClient`.
2022-03-25 10:45:40 +08:00
..
aofmanifest.tcl Implement Multi Part AOF mechanism to avoid AOFRW overheads. (#9788) 2022-01-03 19:14:13 +02:00
benchmark.tcl Added URI support to redis-benchmark (cli and benchmark share the same uri-parsing methods) (#9314) 2021-09-14 19:45:06 +03:00
cli.tcl Improve bind and protected-mode config handling. (#9034) 2021-06-22 12:50:17 +03:00
cluster.tcl Sharded pubsub implementation (#8621) 2022-01-02 16:54:47 -08:00
redis.tcl add test suite infra to test RESP3 attributes (#10247) 2022-02-07 00:10:05 +02:00
server.tcl Fix redis-cli CLUSTER SETSLOT race conditions (#10381) 2022-03-16 10:11:38 -07:00
test.tcl Regression test for sync psync crash (#10288) 2022-02-13 09:52:38 +02:00
tmpfile.tcl
util.tcl optimize(remove) usage of client's pending_querybuf (#10413) 2022-03-25 10:45:40 +08:00