Repository navigation
fix: reset int hashmap scratch before encoding - #32647
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? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ccbe616367401806b1ea9a144b90a5041e92b296
Assessment: approve
Resetting scratch at encoder entry fixes the Find-to-Insert defect and removes duplicated clearing without adding allocations, synchronization or a clearing pass. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Frozen-base control failed the new regression as expected: the second key reused the first group, followed by cleanup allocation-ownership underflow.
-
All 25 hashmap tests passed in normal and race modes; the regression passed 100 race repetitions. All 131 HashBuild tests passed without skips.
-
Build, vet, preflight, formatting, diff and source/native/receipt audits passed. Evidence is retained in validation-audit.json.
-
Reviewed the complete delta, linked issue and all three discussion entries.
Limitations:
-
Local checks used Linux/amd64 and Go 1.26.6. Supplied CI remained pending.
-
The reported three-CN SQL validation was not independently rerun; raw logs were unavailable.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #32568
What this PR does / why we need it:
IntHashMapreuseskeysandkeyOffs. InHashBuild'sInsert -> Find -> Insertpath,Findleft the offset advanced for a BIGINT; the nextInsertwrote beyond its key slot and corrupted runtime-filter cleanup state. The surviving CN then retained a runtime-filter allocation and suspended account admission.Reset both scratch slices inside
encodeHashKeys, at the unsafe encoder's ownership boundary, before every encoding. This removes call-order dependence by centralizing the existing per-operation clears at encoder entry;Insertmoves its reset from the defer. It adds no clearing pass. Add a deterministic regression test for the sequence with distinct keys.Validation:
go test ./pkg/common/hashmap -count=1with Go 1.26.4.cmd/mo-servicebuild with Go 1.26.4 and CGO enabled.bvalues; no allocation-admission or panic signals appeared.