Skip to content
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

[FEATURE REQUEST] Update Redis GO library to support Redis 7 #570

Closed
abit2 opened this issue Nov 4, 2022 · 3 comments · Fixed by #627
Closed

[FEATURE REQUEST] Update Redis GO library to support Redis 7 #570

abit2 opened this issue Nov 4, 2022 · 3 comments · Fixed by #627
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@abit2
Copy link

abit2 commented Nov 4, 2022

Is your feature request related to a problem? Please describe.
Steps to reproduce

  1. Creating a redis cluster with redis 7. link
  2. Following the steps in wiki link
  3. Run the enqueue code below.
client := asynq.NewClient(asynq.RedisClusterClientOpt{
		Addrs: []string{"localhost:7000", "localhost:7001", "localhost:7002", "localhost:7003", "localhost:7004", "localhost:7005"},
	})
	defer client.Close()

	// ------------------------------------------------------
	// Example 1: Enqueue task to be processed immediately.
	//            Use (*Client).Enqueue method.
	// ------------------------------------------------------

	task, err := tasks.NewEmailDeliveryTask(42, "some:template:id")
	if err != nil {
		log.Fatalf("could not create task: %v", err)
	}
	queues := []string{"q_1", "q_2", "q_3", "q_4"}
	for i := 0; i < 10000; i++ {
		que := queues[i%4]
		info, err := client.Enqueue(task, asynq.Queue(que))
		if err != nil {
			log.Fatalf("could not enqueue task: %v %s", err, que)
		}

		log.Printf("enqueued task: id=%s queue=%s", info.ID, info.Queue)
	}

Describe the solution you'd like
Seems to be related to the redis/v8 library results in error link
Upgrading to redis/v9 might solve this?

error: SADD failed: got 4 elements in cluster info address, expected 2 or 3

Additional context
Following the steps above to figure out how to use asynq

@abit2 abit2 added the enhancement New feature or request label Nov 4, 2022
@kamikazechaser
Copy link
Collaborator

kamikazechaser commented Nov 14, 2022

go-redis/v9 is not backward compatible afaik. This would be a breaking change.

@hibiken hibiken added the good first issue Good for newcomers label Dec 24, 2022
@kamikazechaser
Copy link
Collaborator

redis/go-redis#2241

^ Relevant discussion.

Might need some testing with redis v6 and v7 with go-redis v9. If it passes, we could use go-redis v9.

@kamikazechaser
Copy link
Collaborator

Related to #602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants