Skip to content

Feature: Move operation locks to database #63

@Egge21M

Description

@Egge21M

Operation locks that prevent concurrent calls to the same operation are currently living in memory only. Using a OpLock table we can move them to the attached database and provide them to additional processes.

Interface:
interface LockRepository {
tryAcquireLock(key: string, ttl: number): Promise<Lock | null>;
releaseLock(key: string): Promise;
getLock(key: string): Promise<Lock | null>;
}

interface Lock {
key: string;
acquiredAt: number;
ttl: number; // milliseconds
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions