Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[TRI-3867] Updating lots of environment variables at once fails with a transaction timeout #1411

Copy link
Copy link
@matt-aitken

Description

@matt-aitken
Issue body actions

When we bulk upsert environment variables we wrap the entire thing in a database transaction. If there are a lot of env vars (e.g. more than 100) then the transaction can timeout.

You can see in the current code that the transaction is wrapped around the for loop:

const result = await $transaction(this.prismaClient, async (tx) => {

Instead we should move that transaction inside the for loop. We still need the transaction so we always create all the resources for each env var and don't leave any of them dangling.

TRI-3867

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    UrgentCreated by Linear-GitHub SyncCreated by Linear-GitHub SyncbugSomething isn't workingSomething isn't workinglinear

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.