-
Notifications
You must be signed in to change notification settings - Fork 21
v6: Per-collection-handle tenant #445
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
Merged
Conversation
This file contains hidden or 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
E.g., when nearText is called with NearText.of() instead of a 'String queryTerm', consistencyLevel must be added on the RPC level.
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
Enpoint interface already provides a convenient way to supply query parameters, so there isn't much value in indirecting this over ContextEndpoint. Furthermore, the latter's implementation assumes too much knowledge of the internal.rest package. As for gRPC, ContextRpc had to do type checks, so there's hardly any code savings that this approach brings. Adding the parameters to the messages 'in place' seems to me much more straightforward. Finally, I merged the 3 test classes for data/query/aggregate namespaces into one because they follow the same structure, so grouping them will benefit the reader.
This method is only used in one place, inlining it makes more sense.
Merged
antas-marcin
approved these changes
Aug 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an option to set default consistency level and/or tenant on a CollectionHandle/-Async. If set, these will be applied to all operations in
aggregate
,query
anddata
namespaces. SeeCollectionHandleTest
for a list of all affected requests.Default consistency level / tenant
The API is simple and similar to that in the Python client (examples show consistency level, but it works the same way for tenants):
CollectionHandle/-Async can be inspected:
Default ConsistencyLevel can be overridden for an individual query. For example, this search is done with
ConsistencyLevel.ONE
.To configure both parameters in one go users can call
.withDefaults
like so:Tenants API
Updated (and fixed JSON naming) of multi-tenancy configuration components.
Calling
.multiTenancy
will "enable" it. To prevent that behavior users can setmt.enabled(false)
explicitly.Creating, searching, updating, and deleting tenants is supported:
Get shards
The
get-shards
request now includes tenant query parameter if a default one is set on the collection handle.