Skip to content

Add redis cluster#6446

Merged
mattklein123 merged 65 commits intoenvoyproxy:masterfrom
HenryYYang:add-redis-cluster
May 6, 2019
Merged

Add redis cluster#6446
mattklein123 merged 65 commits intoenvoyproxy:masterfrom
HenryYYang:add-redis-cluster

Conversation

@HenryYYang
Copy link
Copy Markdown
Contributor

Description: Add phase 1 of redis cluster support, in this phase, we'll periodically refresh the cluster topology and add all the masters nodes to the cluster.
Risk Level: Low
Testing: Added unit tests
Docs Changes:
Release Notes: Done
#5697

HenryYYang and others added 30 commits February 18, 2019 05:03
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Signed-off-by: Henry Yang <[email protected]>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

In general looks very good. Thanks a ton for adding the integration test. A few questions and small comments.

/wait

Update the cluster slot map.

Signed-off-by: Henry Yang <[email protected]>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Generally looks very nice. Flushing out some more comments. Thank you!

/wait

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks looks good. Some remaining nits. Please merge master to fix CI.

/wait

current_request_ = nullptr;
if (!current_host_address_.empty()) {
auto client_to_delete = client_map_.find(current_host_address_);
if (client_to_delete != client_map_.end()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this ever not be true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's possible if the remote connection was close and if the client's onEvent got invoked before the onFailure got called. This is not possible with the current implementation, I put it in here just to be defensive.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK that's what I thought. Can you remove this error handling and anything similar that can't happen? Than you.

/wait

Signed-off-by: Henry Yang <[email protected]>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks this looks great. I looked at the coverage report and you are still missing some error branch coverage. Please add some more tests so that all of that is covered. Thank you!

/wait

Signed-off-by: Henry Yang <[email protected]>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Nice work. Still missing a bit of coverage on some error/shutdown cases, but will let it slide. Please add in a follow up.

@mattklein123 mattklein123 merged commit ac1757f into envoyproxy:master May 6, 2019
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