Repository navigation
fix(hashbuild): avoid runtime filter budget false rejection - #26231
Merged
mergify[bot] merged 3 commits intoJul 27, 2026
Merged
mergify[bot] merged 3 commits into
mergify[bot] merged 3 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
approved these changes
Jul 27, 2026
XuPeng-SH
left a comment
Contributor
There was a problem hiding this comment.
Deep review completed. Runtime-filter budget admission fallback preserves correctness, lifecycle/accounting failures remain fatal, and reservation/message ownership closes on all paths. Focused, full hashbuild/hashjoin, race, build, vet, and CI checks are green.
Contributor
Merge Queue Status
This pull request spent 3 hours 30 minutes 47 seconds in the queue, including 34 minutes 7 seconds running CI. Required conditions to merge
|
1 task done
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…igin#26231) Runtime-filter serialization previously reserved three times an estimated payload even though the source unique-key vector was already covered by the hash-build auxiliary reservation. For the workload in matrixorigin#26192 this produced a 22.16 GB admission request and failed LOAD before serialization, while the single-payload estimate was about 7.39 GB. This PR: - reserves one serialized payload plus bounded null-bitmap temporary memory and allocator slack; - pre-grows the output buffer once, verifies its actual capacity, and reconciles the reservation to retained capacity after marshal; - falls back to `RuntimeFilter_PASS` only when the optional runtime filter is rejected by real hash-build budget admission, while closed/invalid/accounting errors remain fatal; - records fallback count and requested/used/cap bytes in HashBuild extra stats and diagnostic logs; - covers IN, UNIQUEJOINKEYS, closed-budget, reservation release, varlena area, and non-empty null bitmap paths. Validation: - `go build ./pkg/sql/colexec/hashbuild/...` - `go vet ./pkg/sql/colexec/hashbuild/...` - `go test -count=1 ./pkg/sql/colexec/hashbuild/... ./pkg/sql/colexec/hashjoin/...` Approved by: @XuPeng-SH
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…igin#26231) Runtime-filter serialization previously reserved three times an estimated payload even though the source unique-key vector was already covered by the hash-build auxiliary reservation. For the workload in matrixorigin#26192 this produced a 22.16 GB admission request and failed LOAD before serialization, while the single-payload estimate was about 7.39 GB. This PR: - reserves one serialized payload plus bounded null-bitmap temporary memory and allocator slack; - pre-grows the output buffer once, verifies its actual capacity, and reconciles the reservation to retained capacity after marshal; - falls back to `RuntimeFilter_PASS` only when the optional runtime filter is rejected by real hash-build budget admission, while closed/invalid/accounting errors remain fatal; - records fallback count and requested/used/cap bytes in HashBuild extra stats and diagnostic logs; - covers IN, UNIQUEJOINKEYS, closed-budget, reservation release, varlena area, and non-empty null bitmap paths. Validation: - `go build ./pkg/sql/colexec/hashbuild/...` - `go vet ./pkg/sql/colexec/hashbuild/...` - `go test -count=1 ./pkg/sql/colexec/hashbuild/... ./pkg/sql/colexec/hashjoin/...` Approved by: @XuPeng-SH
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…igin#26231) Runtime-filter serialization previously reserved three times an estimated payload even though the source unique-key vector was already covered by the hash-build auxiliary reservation. For the workload in matrixorigin#26192 this produced a 22.16 GB admission request and failed LOAD before serialization, while the single-payload estimate was about 7.39 GB. This PR: - reserves one serialized payload plus bounded null-bitmap temporary memory and allocator slack; - pre-grows the output buffer once, verifies its actual capacity, and reconciles the reservation to retained capacity after marshal; - falls back to `RuntimeFilter_PASS` only when the optional runtime filter is rejected by real hash-build budget admission, while closed/invalid/accounting errors remain fatal; - records fallback count and requested/used/cap bytes in HashBuild extra stats and diagnostic logs; - covers IN, UNIQUEJOINKEYS, closed-budget, reservation release, varlena area, and non-empty null bitmap paths. Validation: - `go build ./pkg/sql/colexec/hashbuild/...` - `go vet ./pkg/sql/colexec/hashbuild/...` - `go test -count=1 ./pkg/sql/colexec/hashbuild/... ./pkg/sql/colexec/hashjoin/...` Approved by: @XuPeng-SH
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26192
What this PR does / why we need it:
Runtime-filter serialization previously reserved three times an estimated payload even though the source unique-key vector was already covered by the hash-build auxiliary reservation. For the workload in #26192 this produced a 22.16 GB admission request and failed LOAD before serialization, while the single-payload estimate was about 7.39 GB.
This PR:
RuntimeFilter_PASSonly when the optional runtime filter is rejected by real hash-build budget admission, while closed/invalid/accounting errors remain fatal;Validation:
go build ./pkg/sql/colexec/hashbuild/...go vet ./pkg/sql/colexec/hashbuild/...go test -count=1 ./pkg/sql/colexec/hashbuild/... ./pkg/sql/colexec/hashjoin/...