Skip to content

Enforce hashtagging for Redis clusters#8418

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
HenryYYang:enforce-hashtag
Sep 30, 2019
Merged

Enforce hashtagging for Redis clusters#8418
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
HenryYYang:enforce-hashtag

Conversation

@HenryYYang
Copy link
Copy Markdown
Contributor

Description: When mirroring traffic from a non-hashtagging-enabled cluster to a cluster that supports OSS Redis Cluster protocol, we need to ensure hashtagging is enabled on the OSS Redis Cluster. Otherwise there will be a lot of redirection traffic.
Risk Level: Low
Testing: Added unit test
Docs Changes: N/A
Release Notes: Yes

Signed-off-by: Henry Yang <hyang@lyft.com>
@mattklein123 mattklein123 self-assigned this Sep 27, 2019
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 LGTM but hoping that we can make the code a bit simpler to understand. Thank you!

/wait

public Upstream::LoadBalancerContextBase {
public:
/**
* The load balancer context for Redis requests. Note that use_crc16 implies using Redis cluster
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.

The fact that use_crc16 implied redis cluster is kind of confusing. Can you potentially rename this variable in some way to make this more clear? It seems like this type of logic is better handled at the caller?

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.

yes, the naming is a bit confusing. Let me change that and update the comments. Having this logic here is easier to test than in connection pool.

Signed-off-by: Henry Yang <hyang@lyft.com>
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, much more clear!

@mattklein123 mattklein123 merged commit d76e9b3 into envoyproxy:master Sep 30, 2019
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Oct 4, 2019
Signed-off-by: Henry Yang <hyang@lyft.com>
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.

2 participants