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

Disable dark traffic dispatching during dark warmup #1032

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

shivamgupta1
Copy link
Contributor

@shivamgupta1 shivamgupta1 commented Oct 24, 2024

Description

Sending dark traffic during dark warmup is risky since it can result in the calls being sent back to the same hosts, resulting in a cycle.

Changes:

  • Use ZookeeperAnnouncer in dark cluster utils to ensure that no dark requests are sent while any of the announcers is in warmup mode (and the app is receiving some dark traffic).

Testing

Added UT.

@shivamgupta1 shivamgupta1 marked this pull request as ready for review October 24, 2024 22:28
@shivamgupta1 shivamgupta1 merged commit 6ca54b8 into master Oct 25, 2024
2 checks passed
@shivamgupta1 shivamgupta1 deleted the sgupta8/cyclic branch October 25, 2024 23:13
Comment on lines +124 to +128
for (ZooKeeperAnnouncer announcer : _announcers) {
if (announcer.isWarmingUp()) {
return false;
}
}
Copy link
Collaborator

@brycezhongqing brycezhongqing Oct 26, 2024

Choose a reason for hiding this comment

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

Just a nit

Suggested change
for (ZooKeeperAnnouncer announcer : _announcers) {
if (announcer.isWarmingUp()) {
return false;
}
}
if (_announcers.stream().anyMatch(ZooKeeperAnnouncer::isWarmingUp))
{
return false;
}

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