-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[ENH] Add rendezvous hashing to go and python. Add Assignment policy to go so it can be used in future commits #1360
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
chromadb/utils/rendezvous_hash.py
Outdated
@@ -0,0 +1,29 @@ | |||
# An implementation of https://en.wikipedia.org/wiki/Rendezvous_hashing | |||
from typing import Callable, cast |
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.
Note that the go code and the python code never have to agree on a rendezvous hash so its ok that we don't cross-test for now.
"chroma_log_15", | ||
} | ||
|
||
type RendezvousAssignmentPolicy struct { |
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.
Rendezvous hashing is a good starting point. We need to minimize topic assignment change for the topic assignment as one of the design goal for topic assignment reconfiguration.
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.
Yep!
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.
LGTM. I suggest at least adding basic unit tests.
a494cf4
to
78abb33
Compare
a579403
to
4c660e2
Compare
8886326
to
72a39b5
Compare
4c660e2
to
844c5b9
Compare
…so it can be used in future commits
844c5b9
to
5099873
Compare
Description of changes
Summarize the changes made by this PR.
Adds basic rendezvous hashing to the python and go codebases so it can be used
Test plan
How are these changes tested?
Basic unit tests. Manually tested against k8s.
Documentation Changes
None required