Skip to content

[ISSUE-3402]: Ring.Pipelined return dial timeout error #3403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smnvdev
Copy link

@smnvdev smnvdev commented Jun 11, 2025

@ndyakov
Copy link
Member

ndyakov commented Jun 18, 2025

@smnvdev thank you for your contribution, I hope @monkey92t or @vmihailenco can review this, If not we will review it when possible, but Ring is not our main priority at the moment, just letting you know.

@ndyakov ndyakov requested a review from Copilot June 18, 2025 13:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses the dial timeout error issue for the Ring.Pipelined method by adding a new test case and adjusting the pipeline processing logic.

  • Adds a test in ring_test.go to ensure a dial timeout error is returned when an invalid address is provided with a low dial timeout.
  • Modifies the pipeline processing in ring.go to correctly handle transactional pipelines using a distinct hook assignment.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ring_test.go New test case to check dial timeout errors in the pipeline function.
ring.go Updates to pipeline processing including refined hook assignment.
Comments suppressed due to low confidence (1)

ring_test.go:293

  • [nitpick] Consider enhancing the test by asserting that the error is specifically a dial timeout error rather than any error, to ensure the test accurately verifies the intended behavior.
			Expect(err).To(HaveOccurred())

_ = shard.Client.processTxPipelineHook(ctx, cmds)
} else {
_ = shard.Client.processPipelineHook(ctx, cmds)
cmds, hook = wrapMultiExec(ctx, cmds), shard.Client.processTxPipelineHook
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The inline reassignment of both cmds and hook for the transaction pipeline branch might benefit from clearer separation or additional comments to improve code clarity between transactional and non-transactional pipelines.

Suggested change
cmds, hook = wrapMultiExec(ctx, cmds), shard.Client.processTxPipelineHook
// Modify cmds for transactional pipeline.
cmds = wrapMultiExec(ctx, cmds)
// Use the transactional pipeline hook.
hook = shard.Client.processTxPipelineHook

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants