-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This will allow us to configure a prefix-based colocation, for example: ``` ... "bucketize": True, "total_buckets": "%total-buckets%", "buckets_colocation": { "asdf": 1000, "qwert": 2000, "zxcv": 3000 }, "bucketization_keyspace": "main" ... ``` The colocation works like this: 1. If the key matches any of the configured prefixes, do the following: - **bucket** = hash the key to a number [0, configured_buckets_for_prefix). - construct a string like this: <**prefix**><**bucket**> and hash it to a **bucket2**. - use **bucket2** as a routing key. 2. If there is no match, hash the key to a bucket same as it was before. Reviewed By: udippant Differential Revision: D53232349 fbshipit-source-id: 6ba56a91e52c77017d468cec78e17a521425b43b
- Loading branch information
1 parent
fb23451
commit fa880c5
Showing
4 changed files
with
135 additions
and
24 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
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