Project

General

Profile

Actions

Bug #13593

closed

[API] Sequence of "create group" requests runs slowly, and can crash API server

Added by Peter Amstutz almost 6 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
3.0
Release relationship:
Auto

Description

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.

The approach would be:

  • Accept an async param to permission-changing calls that would delay the permission graph update for a server configurable number of seconds in the future.
  • When updating the permission graph asynchronously, use the CONCURRENTLY parameter to avoid blocking SELECT while it’s being updated. (PostgreSQL 9.4 feature, check API server’s dependency requirements).
  • Use status 202 (Accepted) on async call responses.
  • Make a performance analysis comparison to make sure the issue is solved.
  • Update documentation.

Subtasks 1 (0 open1 closed)

Task #14895: Review 13593-async-perm-graph-updateResolvedPeter Amstutz03/12/2019Actions

Related issues

Related to Arvados - Bug #14966: [API] Fix hanging test - suspect permission changesResolvedLucas Di Pentima03/13/2019Actions
Blocks Arvados - Feature #13688: [API] optional asynchronous flag for create/update operationsNewActions
Actions

Also available in: Atom PDF