[cp2.6]fix:remove db_name from grpchandler to client (#3211)#3226
[cp2.6]fix:remove db_name from grpchandler to client (#3211)#3226sre-ci-robot merged 3 commits intomilvus-io:2.6from
Conversation
Cherry-picked from 8e0daa0, excluding snapshot-related changes from 262ab27. Signed-off-by: silas.jiang <[email protected]>
fc64962 to
fab6e06
Compare
Summary of ChangesHello @jac0626, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant architectural change in how database context is managed within the PyMilvus client library. By shifting Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a significant and well-executed refactoring to decouple the database name from the connection state. This allows multiple clients to share a single connection while operating on different databases, which is a great improvement. The introduction of CallContext to pass db_name on a per-request basis is a solid approach. The changes are extensive, touching client handlers, ORM classes, and utility functions. The use of _unbind_with_db to differentiate between ORM and MilvusClient connections is a clever way to manage this transition.
I've identified a critical bug in the asynchronous handler that would cause a runtime error, as well as some inconsistencies in how db_name is retrieved for backward compatibility, which could lead to subtle issues. My review comments focus on these points.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 2.6 #3226 +/- ##
======================================
Coverage ? 48.61%
======================================
Files ? 70
Lines ? 14777
Branches ? 0
======================================
Hits ? 7184
Misses ? 7593
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: silas.jiang <[email protected]>
Signed-off-by: silas.jiang <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jac0626, XuanYang-cn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
see #3175