Skip to content

Fix #1048 (follow-up): nullable other_process_cpu in config.ensure_collection_table#1052

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/1048-ensure-collection-table
Jun 3, 2026
Merged

Fix #1048 (follow-up): nullable other_process_cpu in config.ensure_collection_table#1052
erikdarlingdata merged 1 commit into
devfrom
fix/1048-ensure-collection-table

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

What

config.ensure_collection_table (install/06) — the proc that recreates a collection table on demand if it's missing — still declared collect.cpu_utilization_stats.other_process_cpu_utilization as NOT NULL, even though the #1048 Linux host-CPU fix (#1049) made that column nullable everywhere else (install/02 CREATE TABLE + the 2.11.0→2.12.0 upgrade ALTER).

If that proc ever recreates the table, the Linux collector's NULL insert (host CPU isn't derivable on Linux) would fail again — silently re-introducing #1048 on the recreate path.

Change

One line in install/06_ensure_collection_table.sql: NOT NULLNULL on other_process_cpu_utilization, matching install/02 and upgrade 02. The persisted computed total_cpu_utilization already tolerates a NULL base column (NULL propagates).

Context

Caught during 2.12.0 release prep (which was subsequently shelved); salvaged as a standalone fix since it's an independent completion of #1048, unrelated to the shelved work.

🤖 Generated with Claude Code

… config.ensure_collection_table

The #1048 Linux host-CPU fix made collect.cpu_utilization_stats.other_process_cpu_utilization
nullable in install/02 and added the upgrade-folder ALTER, but config.ensure_collection_table
(the on-demand "recreate a missing collection table" proc in install/06) still declared the
column NOT NULL. If that proc ever recreates the table, the Linux collector's NULL insert would
fail again — re-introducing #1048 on the recreate path. Aligns the proc's CREATE block with
install/02 + upgrade 02.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit db134d1 into dev Jun 3, 2026
6 checks passed
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