Bug #13593

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

Added by Peter Amstutz 6 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

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.

Avoiding impact on other API requests

Problem TBD. Try to reproduce.

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. (moved to #13688)
  • 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

Related issues

Blocks Arvados - Feature #13688: [API] optional asynchronous flag for create/update operationsNew

History

#1 Updated by Peter Amstutz 6 months ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz 6 months ago

  • Description updated (diff)

#3 Updated by Tom Morris 6 months ago

  • Status changed from In Progress to New
  • Target version set to To Be Groomed

#4 Updated by Peter Amstutz 6 months ago

  • Subject changed from Batch create groups to Creating many groups is slow

#5 Updated by Peter Amstutz 6 months ago

  • Tracker changed from Feature to Bug
  • Description updated (diff)

#6 Updated by Tom Clegg 6 months ago

  • Subject changed from Creating many groups is slow to [API] Sequence of "create group" requests runs slowly, and can crash API server
  • Description updated (diff)

#7 Updated by Tom Clegg 6 months ago

  • Description updated (diff)

#8 Updated by Tom Clegg 6 months ago

  • Blocks Feature #13688: [API] optional asynchronous flag for create/update operations added

#9 Updated by Tom Clegg 6 months ago

  • Description updated (diff)

Also available in: Atom PDF