Skip to content

Cache Broken Connections #3401

@ddimaria

Description

@ddimaria

Basic description/background

When a connection to a datasource in the connection service is not possible, it can time out in some circumstances (e.g. ssh connections that don't respond). While this is expected in some cases, we can optimize the connection service to explicitly avoid retrying for a period of time (TBD).

For schema API calls, add a url parameter ?cache_error=true to invoke this system.

In the connection service, convert the cache to an enum instead of a struct to capture the different states:

Current:

struct Cache {
    schema: Arc<Mutex<MemoryCache<Uuid, Schema>>>,
}

Proposed:

enum SchemaCache {
    Success(Schema),
    Error(String),
}

struct Cache {
    schema: Arc<Mutex<MemoryCache<Uuid, SchemaCache>>>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions