-
Notifications
You must be signed in to change notification settings - Fork 97
[controller] Fix bug in ProtocolVersionAutoDetectionService #1795
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
Merged
minhmo1620
merged 11 commits into
linkedin:main
from
minhmo1620:bbq/fix_protocol_service
May 19, 2025
Merged
[controller] Fix bug in ProtocolVersionAutoDetectionService #1795
minhmo1620
merged 11 commits into
linkedin:main
from
minhmo1620:bbq/fix_protocol_service
May 19, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
huangminchn
reviewed
May 15, 2025
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
.../venice-controller/src/main/java/com/linkedin/venice/controller/server/ControllerRoutes.java
Outdated
Show resolved
Hide resolved
…rom the key in controllerUrlToVersionMap
8702f73
to
726a7eb
Compare
huangminchn
approved these changes
May 19, 2025
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.
Thanks for quick fix, Minh!
.../src/integrationTest/java/com/linkedin/venice/endToEnd/TestProtocolVersionAutoDetection.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
During testing, we identified the following issues:
1. Leadership Check Fails on Startup
initialDelay
is set to0
, so the task runs immediately. This triggers a leadership check before the host is fully initialized.initialDelay
to give the host time to complete setup before the check runs.2. Protocol Mismatch in URL Comparison
controllerUrlToVersionMap
useshttp://
as keys, but incomingrequestURL
s are inhttps://
.controllerUrlToVersionMap
Solution
controllerUrlToVersionMap
Note: During the PR development time, I found one interesting symptom that requires me to disable SSL in integration test. However, HTTPs on production should work.
Issue: When we look for leader/standby in Helix, the port we see is HTTP port, and HTTPs port is defined by multiClusterConfig.
On production, we have different host and the SAME port number. However, at local, we have SAME host (localhost) and different port for different controllers.
When we have Instance, we can get the URL by
getUrl(https)
. The issue is thatgetUrl(true)
will return the same url for any controller with the same host (localhost) and the same port (multiClusterConfigs.getAdminSecurePort()
). WhengetUrl(false)
we wont have issue because the port in Helix is respected.Hence, I need to disable HTTPs in integration test, else, the request will be routed back to leader.
Code changes
Concurrency-Specific Checks
Both reviewer and PR author to verify
synchronized
,RWLock
) are used where needed.ConcurrentHashMap
,CopyOnWriteArrayList
).How was this PR tested?
Does this PR introduce any user-facing or breaking changes?