WS5: probe each server-health column independently (true version-skew resilience)#1081
Merged
Merged
Conversation
…w-resilient) The previous resilience check (#1079) probed a single column (memory_dump_count) and included/read all three server-health columns together -- correct ONLY because upgrades/04 happens to add them in that order. That couples runtime behavior to the migration's column order: a partial, repaired, or out-of-order schema where the probed column exists but an earlier one does not would make the SELECT reference an absent column and bind-error -- the exact failure the resilience was meant to prevent. Now probe each column independently (three COL_LENGTH calls) and include only the present ones in the SELECT (hardcoded names -- no injection), reading each by GetOrdinal so the shifting positions do not matter. Any subset -- none, all, or partial -- reads without a bind error. Dashboard.Tests 457 (+ a partial-subset theory the old all-or-nothing form could not cover). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (follow-up to #1079)
#1079 made the server_properties read skip the WS5 columns when absent, but it probed a single column (
memory_dump_count) and treated the three as all-or-nothing — correct only becauseupgrades/04adds them in that order. That's a hidden coupling to the migration's column order: a partial / repaired / out-of-order schema where the probed column exists but an earlier one doesn't would reference an absent column → the exact bind error the resilience was meant to prevent.Change
COL_LENGTHcalls).GetOrdinalso the shifting ordinals don't matter.Verified the probe live: present columns return a length, an absent one returns NULL.
Tests
Dashboard.Tests 457 — adds a partial-subset
[Theory](lpim+dumps, ifi-only, lpim-only, dumps-only) that the prior all-or-nothing form couldn't represent.🤖 Generated with Claude Code