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

Add redis cluter mode for pubsub #823

Merged
merged 3 commits into from
Apr 21, 2021

Conversation

Taction
Copy link
Member

@Taction Taction commented Apr 15, 2021

Description

Add redis cluter mode for pubsub, change *redis.Client to a redis.UniversalClient interface which can be a Client or ClusterClient.Add a redisType metadata to define redis type as node or cluster.
There are two differences between redis cluster and node.

  1. redis cluster's addr option is a string array, which is a string in node. Alough cluster client can find all redis cluster nodes by one redis node, but in case the node is breakdown that the cluster can get cluster nodes info by other nodes. It is better to define addr in cluster mode can include more nodes adderss separated by comma.
  2. redis cluster can not define db option for it only use default db0.

Issue reference

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

@pkedy pkedy self-assigned this Apr 16, 2021
@Taction
Copy link
Member Author

Taction commented Apr 17, 2021

I've finished modify related docs and create an issue in the doc project.

pubsub/redis/redis.go Show resolved Hide resolved
pubsub/redis/redis.go Show resolved Hide resolved
@yaron2 yaron2 assigned Taction and unassigned pkedy Apr 21, 2021
@yaron2 yaron2 added this to the v1.2 milestone Apr 21, 2021
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@744e5be). Click here to learn what that means.
The diff coverage is 4.16%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #823   +/-   ##
=========================================
  Coverage          ?   34.63%           
=========================================
  Files             ?      102           
  Lines             ?     9414           
  Branches          ?        0           
=========================================
  Hits              ?     3261           
  Misses            ?     5844           
  Partials          ?      309           
Impacted Files Coverage Δ
pubsub/redis/redis.go 27.00% <4.16%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 744e5be...49d1438. Read the comment docs.

@yaron2 yaron2 merged commit 4664268 into dapr:master Apr 21, 2021
Taction added a commit to Taction/components-contrib that referenced this pull request Apr 22, 2021
resolve conflict

* master:
  Increasing overall test timeout to allow for conformance tests to run (dapr#834)
  Improve SMTP binding performance (dapr#782)
  add redis cluter mode for pubsub (dapr#823)
  downgrade the verbosity of lock renewal errors from warn to debug. This error is expected when messages are processed before beingrenewed (dapr#803)
  Improve pulsar publisher performance. (dapr#827)
  optimze(state/redis): output detail redis error (dapr#825)
  Consul nameresolution component (dapr#750)
  Add DNS name resolver. Add unit tests. (dapr#743)
  Azure Service Bus: Changed log level of error on close to info (dapr#830)
  Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (dapr#807)
  Update state/blobstorage.go to add metadata. (dapr#786)
  Azure Service Bus publishing retries when server is "too busy" (dapr#821)

# Conflicts:
#	bindings/redis/redis.go
#	go.mod
#	go.sum
#	pubsub/redis/redis.go
@Taction Taction deleted the add_redis_cluster_support_for_pubsub branch April 23, 2021 01:21
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.

3 participants