-
Notifications
You must be signed in to change notification settings - Fork 806
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
fix(traffic guards): avoid server group lookup #3788
Conversation
On verifyInstanceTermination, short circuit checks for server group instance state if there are no enabled traffic guards for the server group
@@ -231,7 +260,8 @@ public void verifyTrafficRemoval( | |||
TargetServerGroup someServerGroup = serverGroupsGoingAway.stream().findAny().get(); | |||
Location location = someServerGroup.getLocation(); | |||
|
|||
if (!hasDisableLock(someServerGroup.getMoniker(), account, location)) { | |||
Front50Cache front50Cache = new Front50Cache(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't creating a new cache here defeat some of the cache benefit vs passing it in from line 248?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the intent of the cache is it should just live through one public call path through TrafficGuard, so this one is at the start of one of the public verifyTrafficRemoval signatures that eventually calls the same verifyTrafficRemovalInternal as line 248 is calling
There was one case where (for instance termination) the entrypoint from one public method was calling into another public method so that is where I introduced a private method that allows propagating the cache along
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a question/comment otherwise lgtm
On verifyInstanceTermination, short circuit checks for server group instance state if there are no enabled traffic guards for the server group Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
On verifyInstanceTermination, short circuit checks for
server group instance state if there are no enabled
traffic guards for the server group