-
Notifications
You must be signed in to change notification settings - Fork 113
[server][common] Server read quota initialization without CV fallback strategy #2352
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
[server][common] Server read quota initialization without CV fallback strategy #2352
Conversation
57b1f81 to
da95b8f
Compare
lluwm
left a comment
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 @xunyin8 for the fix and it makes sense to me. Left some minor comments to consider.
...es/venice-server/src/main/java/com/linkedin/venice/listener/ReadQuotaEnforcementHandler.java
Outdated
Show resolved
Hide resolved
...es/venice-server/src/main/java/com/linkedin/venice/listener/ReadQuotaEnforcementHandler.java
Outdated
Show resolved
Hide resolved
...common/src/main/java/com/linkedin/venice/helix/HelixCustomizedViewOfflinePushRepository.java
Outdated
Show resolved
Hide resolved
fae5b4c to
d5d106e
Compare
...es/venice-server/src/main/java/com/linkedin/venice/listener/ReadQuotaEnforcementHandler.java
Outdated
Show resolved
Hide resolved
Say Q is total read quota Now imagine we don't know anything outside the server, assuming all other servers are dead, now in that scenario, server knows how many replicas for a given store it is serving, let's call it R Storage node can safely set a default quota of R * Q/N without needing to actively reach out to the outside world, removing the dependency on knowing number of instances present in the cluster. |
This is not entirely correct, what's missing from the above is how many partitions are assigned to the instance. In the case when there are less instances in the cluster than number of partitions then each instance could receive > 1 partitions. Perhaps Q/(min(N, X)) is also incorrect, to be on the safer side in those scenarios it should really be Q/X * ceil(X/N). Let me update the PR. There are other ways to figure out the partition assignment for the instance without CV but it will be a lot more complicated and vulnerable to other races when CV do become available and we do get notified about EV/CV changes. |
d5d106e to
c36e917
Compare
lluwm
left a comment
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 @xunyin8 . LGTM!
...es/venice-server/src/main/java/com/linkedin/venice/listener/ReadQuotaEnforcementHandler.java
Outdated
Show resolved
Hide resolved
f46d905 to
c03ca40
Compare
Problem Statement
VeniceNoHelixResourceExceptionwhich was also unhandled as per problem 1.Solution
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?
New unit tests and existing integration tests.
Does this PR introduce any user-facing or breaking changes?