Skip to content

Performance: Avoid emitting entire document from CouchDB view queries for users/tokens #2571

@jadecarino

Description

@jadecarino

Story

As a Galasa service user, I want the users/tokens views from CouchDB to only emit the whole document if its required, so that view queries do not use up unnecessary disk space and cause performance issues.

Background

This story comes from a suggestion in a review comment in PR. The existing views had been emitting the whole document as does the new view introduced in the PR. All views should be updated to not emit the whole view and if needed, pass in the include_docs query parameter in the request.

Tasks

  • Update all three views in CouchdbAuthStoreValidator to not emit the whole document
  • Update the method that makes the request to the Auth store to accept a boolean for includeDocs
  • If boolean is true, add the include_docs query parameter in the request
  • Test on Minikube that all requests involving these views work as expected

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🏗 2 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions