Add Usage to QueryResponseWithUnsignedIndices #74
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.
Problem
Usage
is now returned for data plane operations against serverless indexes. This was included in the codebase in this PR where we replaced thevector_service.proto
file with generated classes that included the most recent changes to the data plane including read units: #66However, the newer
QueryResponseWithUnsignedIndices
class does not mapusage
so it gets dropped for query requests using this class.Solution
Update
QueryResponseWithUnsignedIndices
to handleusage
.I also added
toString()
overrides to all of the classes inunsigned_indices_model
since debugging/logging was difficult without it.Type of Change
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.