[backport] Backport sweep for 9.0#4226
Conversation
AI conflict resolution: source PR #4104Avoid offloading writes to IO threads for the slot migration export job while snapshotting. 2 conflicted files Claude Summary
AI-resolved conflicted files Full backport commit diff: commit efe4f502181a.
|
…ob while snapshotting. (#4104) **Problem Description** Atomic slot migration is failing when io-threads enabled and pipeline requests are ongoing ```== CRITICAL == This slot-import-target is sending an error to its slot-import-source: 'Protocol error: invalid CRLF in request' after processing the command 'set'``` **Proposed Fix** Disable I/O threads offloading for slot migration jobs when snapshotting to prevent query buffer desynchronization during pipelining Signed-off-by: Satheesha Gowda <satheesha.balaji@gmail.com>
When loading slot migration import jobs from the RDB, the start and end slots of each range were not validated. A corrupted or truncated RDB could produce out-of-range slot values or a reversed range (start > end), which would then be used to build migration jobs and slot ranges. Reject any slot import range whose start or end slot is greater than or equal to CLUSTER_SLOTS, or whose start slot is greater than the end slot, logging a warning and aborting the load. Fixes #4222. Signed-off-by: Binbin <binloveplay1314@qq.com>
## Summary - `clusterRDBLoadSlotImport()` accepted a variable-length `job_name` from RDB, but `createSlotImportJob()` always `memcpy`'s `CLUSTER_NAMELEN` (40) bytes. A crafted RDB with a shorter name caused a heap out-of-bounds read during startup. - Reject slot-import records whose `job_name` length is not exactly `CLUSTER_NAMELEN`, matching the existing command-path check. - Add an integration test that crafts a short `job_name` RDB and asserts the server fails closed. Fixes #4207 ## Test plan - [x] `./runtest --single tests/integration/rdb-slot-import.tcl` --------- Signed-off-by: quanyeyang <quanyemostima@gmail.com>
d41fa59 to
c1744a1
Compare
Backport sweep for 9.0
Automated cherry-picks from PRs marked "To be backported".
Applied
AI resolution details are posted as comments on this PR when available.
Generated by valkey-ci-agent using Claude Code.