-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Usage to QueryResponseWithUnsignedIndices (#74)
## Problem `Usage` is now returned for data plane operations against serverless indexes. This was included in the codebase in this PR where we replaced the `vector_service.proto` file with generated classes that included the most recent changes to the data plane including read units: #66 However, the newer `QueryResponseWithUnsignedIndices` class does not map `usage` so it gets dropped for query requests using this class. ## Solution Update `QueryResponseWithUnsignedIndices` to handle `usage`. I also added `toString()` overrides to all of the classes in `unsigned_indices_model` since debugging/logging was difficult without it. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Integration tests for this are pending, I believe @rohanshah18 has integration test changes in flight so I didn't make any changes there. We should add assertions on `queryResponse.getUsage().getReadUnits()`. I've run data plane operations locally using the examples folder to validate that we're seeing usage and read units on data plane responses.
- Loading branch information
1 parent
5d087cc
commit 86a5ae7
Showing
3 changed files
with
76 additions
and
0 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