Skip to content

comet_rds: add innodb_monitor_enable=module_trx to rds_cluster_parameters default#27

Draft
CRThaze wants to merge 1 commit into
mainfrom
CRThaze/DND-1307/innodb-monitor-trx-default
Draft

comet_rds: add innodb_monitor_enable=module_trx to rds_cluster_parameters default#27
CRThaze wants to merge 1 commit into
mainfrom
CRThaze/DND-1307/innodb-monitor-trx-default

Conversation

@CRThaze

@CRThaze CRThaze commented Jun 12, 2026

Copy link
Copy Markdown

User description

Draft — opening for early review while the pilot (dply-managed-clients#882) validates the change on stsaasuat via per-customer override. Once that confirms the parameter takes effect cleanly, this becomes the cut-over: subsequent STSaaS rollouts can drop their per-customer overrides and just bump the module pin.

Summary

Adds { name = "innodb_monitor_enable", value = "module_trx", apply_method = "immediate" } to the rds_cluster_parameters variable default in modules/comet_rds. Module default consumers automatically gain the InnoDB transaction monitor on their next terraform apply after bumping the module pin.

Why

The new "Comet RDS / MySQL Health Overview" Grafana dashboard (comet-monitoring#141, now live on chart 1.0.86+) has an "Active Transactions" stat panel (panel 201) reading information_schema.INNODB_METRICS filtered to subsystem='transaction'. Those rows only exist when InnoDB's module_trx transaction monitor is enabled. Aurora MySQL does not expose SYSTEM_VARIABLES_ADMIN so a transient SET GLOBAL is not available — the cluster parameter group is the only enable path. innodb_monitor_enable is dynamic: apply_method: immediate, no reboot, applies on the next terraform apply.

Behavior

Consumer Effect on module bump
Uses module default (no explicit rds_cluster_parameters) Picks up the new parameter automatically
Passes its own list explicitly Unaffected — Terraform list variables replace rather than merge. These callers need to extend their own list.

Affected explicit-override callers in the Comet STSaaS fleet (per dply audit): fetch, netflix, bmw, zoox. They'll be handled in their respective per-customer PRs as part of DND-1307.

cisco lives on the older comet-ml/terraform-aws-comet module (currently pinned at v3.10.0, which predates the rds_cluster_parameters variable). That'll need its own module bump path; out of scope for this PR.

Diff

3 lines (2 inserts, 1 update — the variable description is extended to mention the new entry):

variable "rds_cluster_parameters" {
  description = "...defaults include operational tunings ... plus innodb_monitor_enable=module_trx ..."
  default = [
    ...7 existing entries...
+   { name = "innodb_monitor_enable", value = "module_trx", apply_method = "immediate" },
  ]
}

Test plan

  • Wait for dply-managed-clients#882 to apply on stsaasuat. The override there mirrors this default + adds the same parameter — confirms terraform plan shows only one new entry vs live state, apply succeeds without disruption, and the dashboard panel populates.
  • Mark this PR ready for review.
  • After merge, cut a new minor release (e.g. v1.20.0) — innodb_monitor_enable is additive and dynamic, no breaking-change risk.
  • Follow-up dply PRs bump customer pins where they consume the module default (and drop their interim per-customer overrides where applicable).

Refs

🤖 Generated with Claude Code


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Add innodb_monitor_enable=module_trx to the default rds_cluster_parameters so module consumers automatically enable the InnoDB transaction monitor once they bump the module pin. Enable the modules/comet_rds cluster parameter group to populate the Grafana Active Transactions panel by leveraging the additional metrics exposed via information_schema.INNODB_METRICS.

Latest Contributors(2)
UserCommitDate
diego@crthaze.comcomet_rds: add innodb_...June 12, 2026
jms200comet_rds: split DB-in...May 27, 2026
Review this PR on Baz | Customize your next review

…ters default

Enables the InnoDB transaction monitor on every STSAAS Aurora cluster
that consumes this module with the default `rds_cluster_parameters`.
The metric collected — information_schema.INNODB_METRICS rows where
subsystem='transaction' — is what the new "Active Transactions" stat
panel (panel 201) on the comet-rds-overview Grafana dashboard reads.
Currently shows "No data" everywhere because the monitor was not
enabled by default.

Aurora MySQL does not expose SYSTEM_VARIABLES_ADMIN, so a transient
`SET GLOBAL` is not available; the cluster parameter group is the
only enable path. innodb_monitor_enable is dynamic — apply_method:
immediate, no reboot, applies on the next terraform apply.

Callers passing an explicit `rds_cluster_parameters` will NOT inherit
this default — they need to extend their own list (Terraform list
variables replace rather than merge). Affected callers in the fleet
that explicitly override today: fetch, netflix, bmw, zoox (cisco is on
the older terraform-aws-comet module — separate module bump).

Refs:
  - DND-1307 (driver — STSaaS Aurora module_trx rollout)
  - DND-1263 (PR #141 — ships the comet-rds-overview dashboard that
    exposes the "No data" gap this fills)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CRThaze

CRThaze commented Jun 12, 2026

Copy link
Copy Markdown
Author

This change is also being included via explicit overrides on this PR. The relevant commit is this one. Once that gets applied to STSaaS UAT and we verify it enables the monitoring of active transactions, we can take this PR out of draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant