Skip to content
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

Add Usage to QueryResponseWithUnsignedIndices #74

Merged

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Mar 7, 2024

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)
  • 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.

@austin-denoble austin-denoble marked this pull request as ready for review March 7, 2024 18:32
Copy link
Contributor

@rohanshah18 rohanshah18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change, LGTM.

@austin-denoble austin-denoble merged commit 86a5ae7 into main Mar 7, 2024
8 checks passed
@austin-denoble austin-denoble deleted the adenoble/add-read-units-to-unsigned-query-response branch March 7, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants