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 some redis client config that may be commonly used #763

Merged
merged 12 commits into from
Mar 26, 2021

Conversation

Taction
Copy link
Member

@Taction Taction commented Mar 17, 2021

Description

add some config that can be set from metadata for redis client.

Issue reference

Checklist

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

RELEASE NOTE: Added commonly used Redis client settings

@ghost
Copy link

ghost commented Mar 17, 2021

CLA assistant check
All CLA requirements met.

Copy link
Member

@pkedy pkedy left a comment

Choose a reason for hiding this comment

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

I love seeing more connection settings coming in this PR! I'd like just a few changes for consistency with the duration-based settings.

pubsub/redis/metadata.go Outdated Show resolved Hide resolved
pubsub/redis/metadata.go Outdated Show resolved Hide resolved
pubsub/redis/metadata.go Outdated Show resolved Hide resolved
pubsub/redis/metadata.go Outdated Show resolved Hide resolved
pubsub/redis/redis.go Outdated Show resolved Hide resolved
pubsub/redis/redis.go Outdated Show resolved Hide resolved
pubsub/redis/redis.go Outdated Show resolved Hide resolved
pubsub/redis/redis.go Outdated Show resolved Hide resolved
pkedy and others added 2 commits March 18, 2021 17:56
@pkedy
Copy link
Member

pkedy commented Mar 19, 2021

@Taction Thanks for all your work on this. I know there have been a few iterations now. Two things:

  1. Before this can be merged, there should be an open PR in dapr/docs to update this page with the new settings. Make sure branch from and target the v1.1 branch in the PR. Its easy to forget.

  2. I think I have steered you in the wrong direction with the settings naming but wanted to ask your opinion.

Context: In v1.2 we'll likely be adding more backoff settings to some of the pubsub components. The backoff/retry library we are using handles retries between the sidecar and the application.

Where I steered you wrong: All the settings I had you prefix with backOff are actually between the sidecar and Redis itself. Correct? If that is the case a different prefix should be used. Maybe read? I'm not actually sure where exactly these settings come into play in the client module but I'm assuming its for any CMD call. WDYT?

@pkedy pkedy self-assigned this Mar 19, 2021
@Taction
Copy link
Member Author

Taction commented Mar 21, 2021

@Taction Thanks for all your work on this. I know there have been a few iterations now. Two things:

  1. Before this can be merged, there should be an open PR in dapr/docs to update this page with the new settings. Make sure branch from and target the v1.1 branch in the PR. Its easy to forget.
  2. I think I have steered you in the wrong direction with the settings naming but wanted to ask your opinion.

Context: In v1.2 we'll likely be adding more backoff settings to some of the pubsub components. The backoff/retry library we are using handles retries between the sidecar and the application.

Where I steered you wrong: All the settings I had you prefix with backOff are actually between the sidecar and Redis itself. Correct? If that is the case a different prefix should be used. Maybe read? I'm not actually sure where exactly these settings come into play in the client module but I'm assuming its for any CMD call. WDYT?

@pkedy :

  1. For the second thing, I know what you actually want to tell me. I've seen the use of backoff options in mqtt component which is used for handle retries between the sidecar and the application.But there are lots components do not have these options so I didn't catch the point at that time. And I should have confirmed with you about it.

As for the prefix, is redis a better choice(such as redisMaxRetries)? As far as I'm concerned it may have 2 potential advantage. One is that it may be more easily for users to tell these options apart from backOff options, as the name may shows that it is for redis configuration. Two is that read is a more general expression, if some other components have similar option between client and server read may be a better choice(I am not very familiar with other components now, so i assume that there is not much components whit these option).

  1. For the first thing,I will work on this but it will take me some time to finish it. And It is very kind of you to stress out what is easy to forget.

What's more, in my opinion both read and redis is fine for the prefix. Which one do you think is more suitable?

@pkedy
Copy link
Member

pkedy commented Mar 22, 2021

@Taction

For 1, the backOff* settings are slowly being added to the components starting with the ones that really really need it (e.g. Kafka). Also, backOffMaxRetries is only setting for now but more settings are one their way maybe in 1.2.

For 2, I think we are in agreement! redis or read is fine as a prefix. As the author of this PR, I'll let you decide between the two. :) I just wanted to avoid backOff in this case because its for a different point in the call chain. Again-my mistake for steering you that way to begin with and thanks for your understanding. Once you make that change, we can finally get this merged unless @artursouza has other comments.

Also, please mention the docs PR in this PR or visa versa. Thanks!

@artursouza
Copy link
Member

@Taction

For 1, the backOff* settings are slowly being added to the components starting with the ones that really really need it (e.g. Kafka). Also, backOffMaxRetries is only setting for now but more settings are one their way maybe in 1.2.

For 2, I think we are in agreement! redis or read is fine as a prefix. As the author of this PR, I'll let you decide between the two. :) I just wanted to avoid backOff in this case because its for a different point in the call chain. Again-my mistake for steering you that way to begin with and thanks for your understanding. Once you make that change, we can finally get this merged unless @artursouza has other comments.

Also, please mention the docs PR in this PR or visa versa. Thanks!

LGTM

@pkedy
Copy link
Member

pkedy commented Mar 24, 2021

@Taction To @mukundansundar 's point in your docs PR, we need an issue created as this is a pretty good sized enhancement. We do this for tracking things int the RELEASE NOTES.

@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #763 (22b475e) into master (c1905ba) will increase coverage by 0.08%.
The diff coverage is 37.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #763      +/-   ##
==========================================
+ Coverage   32.78%   32.86%   +0.08%     
==========================================
  Files          97       97              
  Lines        8744     8847     +103     
==========================================
+ Hits         2867     2908      +41     
- Misses       5616     5649      +33     
- Partials      261      290      +29     
Impacted Files Coverage Δ
pubsub/redis/redis.go 28.67% <37.96%> (+6.26%) ⬆️

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 c1905ba...22b475e. Read the comment docs.

@pkedy
Copy link
Member

pkedy commented Mar 26, 2021

@Taction I added RELEASE NOTES to the description of this PR which our release process also picks up. So in the interest of moving this along, no need to create an issue. Just know for the future that large changes need an issue.

@pkedy pkedy merged commit a43a0d9 into dapr:master Mar 26, 2021
@Taction Taction deleted the add_more_config_for_redis branch April 20, 2021 06:48
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