Commit 9104901
authored
[server][common] Server read quota initialization without CV fallback strategy (#2352)
Problem Statement:
1. If one store version is not initialized correctly and throws unhandled exception, we would skip the initialization of follow up stores in the storeRepository
2. If CV repository is delayed or unavailable (which we have been seeing more frequently recently especially with large clusters) then we often fail quota initialization due to VeniceNoHelixResourceException which was also unhandled as per problem 1.
3. Having both initialized and initializedVolatile is confusing and unnecessary.
Solution:
1. Catch unhandled exceptions at the store level and continue initialization for other stores to isolate any initialization errors.
2. If CV is unavailable, i.e. VeniceNoHelixResourceException is thrown or partition assignment map is somehow empty and fallback strategy is enabled (enabled by default but can be disabled via config server.read.quota.initialization.fallback.enabled). We will allocate this instance Q * X/P quota where Q is the total read quota, X is the number of partitions assigned to the node based on storage engine state and P is the store version partition count.
3. Removed initialized flag and only keeping the initializedVolatile flag.
4. Added additional logging to capture only when there is a total quota change and how is the new rate limiter calculated. i.e. the total quota, node responsibility and resulting instance quota. Also added additional logging whenever fallback strategy is invoked regardless of the quota update trigger (from store update or CV update events).1 parent 2b99017 commit 9104901
File tree
8 files changed
+299
-91
lines changed- clients/da-vinci-client/src/main/java/com/linkedin/davinci/config
- internal/venice-common/src/main/java/com/linkedin/venice
- services/venice-server/src
- main/java/com/linkedin/venice/listener
- test/java/com/linkedin/venice/listener
8 files changed
+299
-91
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
691 | 692 | | |
692 | 693 | | |
693 | 694 | | |
| 695 | + | |
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
| |||
1177 | 1179 | | |
1178 | 1180 | | |
1179 | 1181 | | |
| 1182 | + | |
| 1183 | + | |
1180 | 1184 | | |
1181 | 1185 | | |
1182 | 1186 | | |
| |||
2131 | 2135 | | |
2132 | 2136 | | |
2133 | 2137 | | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2134 | 2142 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3085 | 3085 | | |
3086 | 3086 | | |
3087 | 3087 | | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
3088 | 3095 | | |
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments