Fix adjacent slot range behavior in ASM operations#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0443e9f9b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| sds err = NULL; | ||
| if (validateSlotRanges(slots, &err) != C_OK) { | ||
| addReplyErrorSds(c, err); | ||
| if (slotRangeArrayNormalizeAndValidate(slots, &err) != C_OK) { | ||
| sdsfree(err); | ||
| slotRangeArrayFree(slots); |
There was a problem hiding this comment.
Send error reply on slot-range validation failure
When slotRangeArrayNormalizeAndValidate fails (overlapping ranges, start > end, etc.), parseSlotRangesOrReply now frees the error and returns NULL without sending any reply. Callers like clusterMigrationCommandImport and sflushCommand simply return on NULL, so the client receives no response and hangs whenever invalid ranges are supplied. Previously this path called addReplyErrorSds, so this regression breaks error handling for bad input.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#2