-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hot fix: [server] Use thread safe map for versioned stats in SN read …
…quota (#1415) (#1416) [server] Use thread safe map for versioned stats in SN read quota (#1415) Int2ObjectOpenHashMap is not thread safe and using it for ServerReadQuotaUsageStats could result in unexpected behaviors during race conditions since the map is accessed and modified by multiple triggers and threads: Read traffic CV/routing change events Version creation and deletion events Added a test and confirmed that it will hang/timeout with Int2ObjectOpenHashMap but succeed with a thread safe map like VeniceConcurrentHashMap Also minor defensive code change in getReadQuotaUsageRatio to avoid NPE since the map could change in between check and access.
- Loading branch information
Showing
2 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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