Skip to content

Implement connection refresh on circular moved (#5893) - #6023

Merged
jamesx-improving merged 1 commit into
release-2.4from
cherry-pick/5893-to-release-2.4
May 26, 2026
Merged

Implement connection refresh on circular moved (#5893)#6023
jamesx-improving merged 1 commit into
release-2.4from
cherry-pick/5893-to-release-2.4

Conversation

@jamesx-improving

Copy link
Copy Markdown
Collaborator

Back-porting PR #5893 to release-2.4

* Implement connection refresh on circular moved

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

* fix: format redirect_node.map() call on single line

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

* fix(redis-rs): handle circular MOVED redirect in pipeline path

Extract shared is_circular_moved_redirect() function to detect when a
MOVED redirect points to the same address (circular redirect). Apply
this detection to both single command and pipeline paths.

For pipelines, circular MOVED errors now route through the reconnect
logic instead of the normal redirect logic, matching the behavior of
single commands.

Added test to verify pipeline commands recover from circular MOVED +
disconnect scenarios.

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

* chore(deps-dev): bump maturin from 1.13.1 to 1.13.3 in /python in the patch-updates group across 1 directory (#5910)

chore(deps-dev): bump maturin

Bumps the patch-updates group with 1 update in the /python directory: [maturin](https://github.com/pyo3/maturin).

Updates `maturin` from 1.13.1 to 1.13.3
- [Release notes](https://github.com/pyo3/maturin/releases)
- [Changelog](https://github.com/PyO3/maturin/blob/main/Changelog.md)
- [Commits](PyO3/maturin@v1.13.1...v1.13.3)

---
updated-dependencies:
- dependency-name: maturin
  dependency-version: 1.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

* fix(redis-rs): improve circular MOVED detection with hostname/IP resolution

- Add resolve_address parameter to is_circular_moved_redirect to handle
  cases where MOVED returns an IP but client connected via hostname
- Fix resolve_address to preserve original port when resolving IP to
  hostname (the MOVED response port is authoritative)
- Extend circular MOVED detection to pipeline path via handle_redirect_logic
- Add unit tests for hostname vs IP detection scenarios
- Add integration test for pipeline circular MOVED handling

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

* style: fix cargo fmt formatting

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>

---------

Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 87c9991)
Signed-off-by: James Xin <james.xin@improving.com>
@jamesx-improving
jamesx-improving requested a review from a team as a code owner May 26, 2026 16:05
@jamesx-improving
jamesx-improving merged commit a2e841a into release-2.4 May 26, 2026
98 of 99 checks passed
@jamesx-improving
jamesx-improving deleted the cherry-pick/5893-to-release-2.4 branch May 26, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants