{"record":{"id":"e3ec3b01f97892d5","repo":"influxdata/influxdb","slug":"plugin-trigger-is-already-enabled","errorCode":null,"errorMessage":"plugin trigger is already enabled","messagePattern":"plugin trigger is already enabled","errorType":"validation","errorClass":"CatalogError","httpStatus":409,"severity":"warning","filePath":"influxdb3_catalog/src/error.rs","lineNumber":84,"sourceCode":"\n    #[error(\n        \"persisted catalog checkpoint sequence {checkpoint_sequence} is ahead of live catalog sequence {live_sequence}\"\n    )]\n    BackupCheckpointAhead {\n        checkpoint_sequence: u64,\n        live_sequence: u64,\n    },\n\n    #[error(\"invalid configuration provided: {message}\")]\n    InvalidConfiguration { message: Box<str> },\n\n    #[error(\"only tag and string columns are supported in the distinct cache\")]\n    InvalidDistinctCacheColumnType,\n\n    #[error(\"only uint64, int64, bool, tag, and string columns are supported in the last cache\")]\n    InvalidLastCacheKeyColumnType,\n\n    #[error(\"plugin trigger is already enabled\")]\n    TriggerAlreadyEnabled,\n\n    #[error(\"plugin trigger is already disabled\")]\n    TriggerAlreadyDisabled,\n\n    #[error(\"invalid column type for column '{column_name}', expected {expected}, got {got}\")]\n    InvalidColumnType {\n        column_name: Arc<str>,\n        expected: InfluxColumnType,\n        got: InfluxColumnType,\n    },\n\n    #[error(\"'{0}' is a reserved column\")]\n    ReservedColumn(Arc<str>),\n\n    #[error(\n        \"table '{table_name}' is not defined in database '{db_name}', which uses explicit schemas; \\\n         create the table with the /api/v3/configure/table API before writing to it\"","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L66-L102","documentation":"CatalogError::TriggerAlreadyEnabled is thrown when enabling a plugin trigger that is already in the enabled state. The catalog checks the trigger's current status during the enable operation and rejects the redundant state transition (raised from trigger enable ops, e.g. influxdb3_catalog/src/catalog/versions/v3/ops/trigger.rs:178).","triggerScenarios":"POSTing to the trigger enable API (/api/v3/configure/... enable trigger) for a trigger whose status is already 'enabled', or calling catalog enable_trigger twice without an intervening disable.","commonSituations":"Idempotency problems in deployment scripts that re-run enable commands; racing API calls where two clients enable the same trigger concurrently; retrying a request whose first attempt actually succeeded.","solutions":["Check the trigger's current status before enabling (query the trigger list/status) and skip the call if it is already enabled.","Treat this error as success in idempotent automation: catch it and continue when the intent was 'ensure enabled'.","Use the disable API first if you truly need to re-enable the trigger fresh."],"exampleFix":"// before\nclient.post(\"/api/v3/configure/triggers/enable\", {\"trigger\": \"my_trigger\"}); // fails on re-run\n// after\nlet status = client.get(\"/api/v3/configure/triggers/my_trigger\").status;\nif (status !== \"enabled\") {\n  client.post(\"/api/v3/configure/triggers/enable\", {\"trigger\": \"my_trigger\"});\n}","handlingStrategy":"try-catch","validationCode":"const trig = await client.get(`/api/v3/configure/triggers/${name}`);\nif (trig.status === \"enabled\") return; // already enabled","typeGuard":null,"tryCatchPattern":"try {\n  await enableTrigger(name);\n} catch (e) {\n  if (e.message.includes(\"already enabled\")) return; // treat as success\n  throw e;\n}","preventionTips":["Make enable calls idempotent: check status first.","Serialize trigger management through a single control plane/lock.","Never blindly retry enable requests after ambiguous failures."],"tags":["influxdb3","trigger","plugin","idempotency"],"backgroundTag":"invalid-state-transition","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}