Skip to content

Store triggers by DbId and TriggerId instead of name #26153

Open
@hiltontj

Description

@hiltontj

Problem

The ProcessingEngineManagerImpl stores triggers maps that use String names for databases and triggers:

#[derive(Debug, Default)]
struct PluginChannels {
/// Map of database to wal trigger name to handler
wal_triggers: HashMap<String, HashMap<String, mpsc::Sender<WalEvent>>>,
/// Map of database to schedule trigger name to handler
schedule_triggers: HashMap<String, HashMap<String, mpsc::Sender<ScheduleEvent>>>,
/// Map of request path to the request trigger handler
request_triggers: HashMap<String, mpsc::Sender<RequestEvent>>,
}

Proposed solution

  • Change to using the DbId and TriggerId that identify these resources in the catalog.
  • Methods that start/stop triggers should use these IDs as arguments instead of the names.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions