Bug #13593
Updated by Tom Clegg over 6 years ago
A user reported that creating many projects at once resulted in extreme slowdown and eventually crashing the API server unless the create requests were throttled.
Creating a project (or any other group) also refreshes the permissions graph in the same transaction.
This makes the API call slow, but we intend/expect that other API calls can proceed while the update is in progress, so other (non-permission-modifying) API calls aren't expected to be slowed down.
h2. Avoiding impact on other API requests
Problem TBD. Try to reproduce.
h2. Faster "create" calls
Possible approach, covering both serial and concurrent updates:
* Accept an "asynchronous update" flag with create/update requests, indicating the client doesn't need a guarantee that the permission graph is updated when it receives its response.
* Either way, update the permission graph _after_ the create/update transaction is committed, and skip redundant updates.
Skipping redundant updates:
* Acquire lock
* Check whether any updates have occurred since the lock was acquired for the existing version of the graph
* If so, update graph
* Release lock
Make sure to advertise the async flag in the discovery doc via *_requires_parameters methods.