Skip to content

Commit

Permalink
Merge pull request #5128 from hashicorp/tmessi-cherry-pick-cache-speedup
Browse files Browse the repository at this point in the history
Cache speed up and additional performance improvements

This includes several changes to improve the performance of the
client cache, including:

* Making the sqlite database for the cache persistent, so the cache does
   not need to be rebuilt each time the boundary client is started.
* Limiting the number of results retrieved when listing resources to 250.
* Preventing redundant refreshes running at the same time for a given
   client.
* Adding indexes to the cache database.

It also refactors the grants query that is run to fetch grants for a
user when processing a controller API request. This greatly reduces the
amount of data that is returned from the database, but required a number
of changes in the application logic to account for different kinds of
grant scopes.

Lastly this makes some performance improvements in the controller
database. It adds several indexes to help with the grants query and with
delete cascades for several resources. And it changes the delete trigger
for sessions to run per statement instead of per row to help with bulk
deleting of sessions.
  • Loading branch information
tmessi authored Sep 24, 2024
2 parents 30145b1 + 632d048 commit f431d1e
Show file tree
Hide file tree
Showing 125 changed files with 10,159 additions and 3,695 deletions.
199 changes: 144 additions & 55 deletions api/accounts/account.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 35 additions & 6 deletions api/accounts/option.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f431d1e

Please sign in to comment.