fix(redis): make reshard failures and target auth explicit - #552
Open
weicao wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Value::extract_error()for everyCLUSTER SETSLOTandMIGRATEreplyOKfor SETSLOT while permitting Redis' legitimateMIGRATE NOKEYoutcomeAUTHfor password-only targets andAUTH2for username/password targetsAUTHonly for the two exact Redis <6 AUTH2 incompatibility errors; auth failures and near-matches fail closedCOPYorREPLACEmax - min <= 1)Why
The first runtime defect was a false success: a FalkorDB 4.14.12 reshard test using ape-dts image tag
2.0.26-alpha.16produced two fresh runs where the KubeBlocks OpsRequest reachedSucceed, but 29/31 slots retained migrating/importing markers and associated data was unreadable; one isolated run completed cleanly.The extractor used redis-rs 0.27.6
ConnectionLike::req_packed_command, which returns Redis server-ERRreplies asOk(Value::ServerError(...)). The previous code discarded those values, so a failed SETSLOT/MIGRATE could still let the action exit zero. A dirty retry could also have an empty move plan and return success without proving terminal slot ownership.A fresh exact-head fixcheck then exposed the second defect: with destination authentication enabled, the OpsRequest correctly failed and ape-dts exited 101 with
Target instance replied with error: NOAUTH Authentication required.The destination connection itself used merged credentials, but MIGRATE omitted its target-sideAUTH/AUTH2options.This evidence implicates the ape-dts reshard path; it does not claim a regression in the addon change that exposed the runtime case.
Verification
cargo test -p dt-connector redis_reshard_extractor::tests: 20 passedcargo test -p dt-connector: 133 passed, 0 failed, 1 ignoredcargo fmt --all -- --check: passedgit diff --check: passedcargo clippy -p dt-connector --all-targets: exit 0; existing warnings are outside the modified file019f9a1d-651b-73f0-8e2b-043db7546f73:VERDICT: NO BLOCKERResidual nonclaims: a later mutation failure is propagated but earlier partial mutations are not automatically rolled back; the new 30-second bound applies to terminal async verification, not the pre-existing synchronous discovery/mutation I/O; the stalled-I/O test uses a controlled future rather than a live network stall; the Redis <6 fallback is limited to exact known incompatibility replies and is not a broad retry policy. Fresh runtime acceptance of the authenticated fix remains pending.