chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[BUG] Make memberlist use ips for routing

Open HammadB opened this issue 11 months ago • 3 comments

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • The memberlist uses k8s dns based routing for the stateful set. However, this can result in delays when the routing updates. This propagates the ip in the memberlist which is much faster.
    • This change is backwards compatible
      • CRDs fields are optional by default, so not setting the ip is fine if CRD is updated
      • CRD fields can be set in the code without the CRD being updated
      • The python frontend will use the ip if present, otherwise it falls back to the id
      • The go code will read the ip to "" anywhere it expects it to be set if the old version of the CR is used
  • New functionality
    • ...

Test plan

How are these changes tested? Added a test which adds data to a collection, kills the query service pods and waits for them to be ready, simulating a roll out of sorts. Then it issues another query and make sure the query succeeds with updated routing. Before this change, this test failed.

  • [x] Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

None

HammadB avatar Jan 03 '25 23:01 HammadB

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • [ ] Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • [ ] Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • [ ] If appropriate, are there adequate property based tests?
  • [ ] If appropriate, are there adequate unit tests?
  • [ ] Should any logging, debugging, tracing information be added or removed?
  • [ ] Are error messages user-friendly?
  • [ ] Have all documentation changes needed been made?
  • [ ] Have all non-obvious changes been commented?

System Compatibility

  • [ ] Are there any potential impacts on other parts of the system or backward compatibility?
  • [ ] Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • [ ] Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

github-actions[bot] avatar Jan 03 '25 23:01 github-actions[bot]

:white_check_mark: The Helm chart's version was changed. Your changes to the chart will be published upon merge to main.

github-actions[bot] avatar Jan 03 '25 23:01 github-actions[bot]

wondering if you considered using something like linkerd instead?

Hah. It crossed my mind, way more involved. This gets the job done.

HammadB avatar Jan 06 '25 20:01 HammadB