Skip to content

[dbsp] Fix: join hints were not validated correctly.#6571

Merged
ryzhyk merged 1 commit into
mainfrom
fix-join-hint-validation
Jul 3, 2026
Merged

[dbsp] Fix: join hints were not validated correctly.#6571
ryzhyk merged 1 commit into
mainfrom
fix-join-hint-validation

Conversation

@ryzhyk

@ryzhyk ryzhyk commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Hints were supposed to get validated before getting installed as balancer constraints. A silly error caused the validation to run on the balancer config without the hint. As a result the pipeline could crash later where it assumes that the current set of constraints is satisfiable.

Describe Manual Test Plan

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Describe Incompatible Changes

@ryzhyk
ryzhyk requested a review from anandbraman July 1, 2026 22:15
@ryzhyk ryzhyk added the DBSP core Related to the core DBSP library label Jul 1, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice catch and a clean fix. The comment block above the old_hints binding is exactly the kind of "why, not what" explanation that would have prevented this in the first place — solve_cluster reads from self.integrals, so validation has to happen after the write, with rollback on failure.

The regression test is well-scoped: Broadcast on the outer input of a left join is a real user-visible bug path (SQL /*+ broadcast(pt) */ hint), and asserting the circuit still steps cleanly after rejection confirms the rollback actually restored state rather than leaving self.integrals in a half-updated shape.

One small observation, non-blocking: Size and Skew hints are still applied without validation, matching the previous behavior. If those can also produce infeasible cluster states down the line, they'd want the same treatment — but that's a separate question and not something this PR needs to answer.

@ryzhyk
ryzhyk force-pushed the fix-join-hint-validation branch from e6b2183 to bca1dc2 Compare July 2, 2026 04:10
@ryzhyk
ryzhyk enabled auto-merge July 2, 2026 04:10
Hints were supposed to get validated before getting installed as balancer
constraints.  A silly error caused the validation to run on the balancer config
without the hint. As a result the pipeline could crash later where it assumes
that the current set of constraints is satisfiable.

Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
@ryzhyk
ryzhyk force-pushed the fix-join-hint-validation branch from bca1dc2 to 6ed5873 Compare July 2, 2026 05:42
@ryzhyk
ryzhyk added this pull request to the merge queue Jul 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 2, 2026
@ryzhyk
ryzhyk added this pull request to the merge queue Jul 2, 2026
Merged via the queue into main with commit 9d68daf Jul 3, 2026
1 check passed
@ryzhyk
ryzhyk deleted the fix-join-hint-validation branch July 3, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DBSP core Related to the core DBSP library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants