Skip to content

fix(gasoline): skip malformed active worker indexes#4806

Closed
NathanFlurry wants to merge 1 commit intoengine-stabilize/sqlite-v1-migration-openfrom
engine-stabilize/gasoline-skip-bad-worker-index
Closed

fix(gasoline): skip malformed active worker indexes#4806
NathanFlurry wants to merge 1 commit intoengine-stabilize/sqlite-v1-migration-openfrom
engine-stabilize/gasoline-skip-bad-worker-index

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Member Author

NathanFlurry commented Apr 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 27, 2026

PR Review: fix(gasoline): skip malformed active worker indexes

Verdict: Looks good — small, focused resilience fix.

What the change does

When iterating active worker index keys from FDB, a malformed key previously propagated as an error and terminated the entire scan. The fix wraps the unpack in a match, emits a tracing::warn! on failure, and filters the None out with .try_filter_map.

Code quality

  • Consistent with existing patterns. Three other identical skip-and-warn patterns exist in the same file (for other index key types), so this is not a new pattern — it's closing a gap.
  • Correct structured logging. tracing::warn!(?err, "skipping malformed active worker index key") — lowercase message, structured field, no interpolation. Matches project conventions.
  • Type correctness preserved. The Option round-trip via .try_filter_map keeps the downstream type as Vec<WorkerId>, so callers (sort, find_map, etc.) need no changes.
  • Minimal blast radius. Only the error path is affected; the happy path is identical.

Potential issues

None. The change is appropriate for handling mixed-version deploys or rare KV corruption where an old or partial index entry cannot be decoded.

Test coverage

No new tests. Writing a unit test would require injecting raw malformed FDB keys into the harness, which is non-trivial. Given the small scope and consistency with already-untested sibling paths, this is acceptable.

Summary

Clean defensive change that matches established codebase conventions. No concerns.

@NathanFlurry NathanFlurry force-pushed the engine-stabilize/gasoline-skip-bad-worker-index branch from 1fbd8c3 to f29750e Compare April 27, 2026 07:30
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