Project

General

Profile

Actions

Idea #8886

closed

[API] Do not block individual API queries on rebuilding the permissions graph

Added by Brett Smith about 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
04/13/2016
Due date:
Story points:
2.0

Description

Functional requirements:

  • Do not change the database structure.
  • Do not write new Go code. As much as possible, we want to use the existing code, just adapt it to run out of band from the request cycle.
  • Updating the permissions cache happens outside the normal request handler cycle. No individual request waits for the permissions cache to be updated before it is handled. Each request just uses the "latest" permissions cache available, at least from the first time that it needs the cache.
    Unless it is unreasonably hard, each request should use the same permissions cache throughout its lifecycle. (In general we want this, and if it's low-hanging fruit, this seems like a good opportunity to make that happen. However, we believe that we do not currently have this behavior today, and fixing this is not so pressing that we're willing to hold up the performance improvement on it.)
  • This new permissions cache handling is behind a feature flag in application.yml called async_permissions_update. When the flag is falsy, the API server continues to use its current behavior of rebuilding the permissions cache when needed. The default in application.default.yml is false.

Subtasks 3 (0 open3 closed)

Task #9090: Write permission rebuild serviceResolvedPeter Amstutz04/13/2016Actions
Task #8978: ReviewResolvedPeter Amstutz04/13/2016Actions
Task #9091: TestingClosedPeter Amstutz04/13/2016Actions

Related issues

Related to Arvados - Bug #8787: [API] repositories/get_all_permissions method is too slowResolved03/24/2016Actions
Precedes (1 day) Arvados - Idea #9186: [API] Test client impact of async_permissions_update=TrueClosed04/15/201604/15/2016Actions
Precedes (1 day) Arvados - Idea #9502: [API] Update permissions cache as needed after select writesResolved06/28/2016Actions
Actions

Also available in: Atom PDF