Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return errors for invariant violations during query planning #2209

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

joshua-spacetime
Copy link
Collaborator

Description of Changes

Instead of invoking unreachable! in the query rewrite code, now we return an error. An error means we have an internal logic bug, but we don't want the server to panic in that case. Instead we just log the error. There's a TODO for handling the error appropriately in the subscription code.

API and ABI breaking changes

None

Expected complexity level and risk

2

Just a return type change and updating callers.

Testing

A simple refactor so no new tests added.

Copy link
Contributor

@mamcx mamcx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joshua-spacetime joshua-spacetime changed the title Return errors for invariant failures during query planning Return errors for invariant violations during query planning Feb 4, 2025
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Feb 4, 2025
Merged via the queue into master with commit e4e36ec Feb 4, 2025
15 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/return-errors-query-rewriter branch February 4, 2025 22:21
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.

2 participants