Skip to content

[CodeRabbit review] upstream #10585: Fix crash by using alignedAlloc rather than alloc (#10554) - #24

Open
jebter wants to merge 2 commits into
coderabbit/release-8.5-base-b50ff411-configfrom
coderabbit/release-8.5-pr-10585-config
Open

jebter wants to merge 2 commits into
coderabbit/release-8.5-base-b50ff411-configfrom
coderabbit/release-8.5-pr-10585-config

Conversation

@jebter

@jebter jebter commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Original upstream pull request: pingcap#10585

This is an immutable review-only mirror of the exact upstream base/head commits. Both branches add the same .coderabbit.yaml solely to enable CodeRabbit; it is review-enabling metadata and not an upstream code change. The branches and this PR must not be modified, rebased, merged, or closed.

Summary by CodeRabbit

  • Reliability

    • Improved memory handling for aggregate functions, aggregation states, and join processing to support more reliable execution across supported data types and operations.
  • Maintenance

    • Removed unused aggregation code and outdated commented implementations.
  • Development Workflow

    • Enabled automatic code reviews for designated release branches.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c52a9046-c174-4d01-89a4-39770f2d50d4

📥 Commits

Reviewing files that changed from the base of the PR and between eed23c3 and 214aa4c.

📒 Files selected for processing (7)
  • .coderabbit.yaml
  • dbms/src/AggregateFunctions/AggregateFunctionGroupArray.h
  • dbms/src/Columns/ColumnAggregateFunction.cpp
  • dbms/src/DataTypes/DataTypeAggregateFunction.cpp
  • dbms/src/Interpreters/AggregationCommon.h
  • dbms/src/Interpreters/JoinPartition.cpp
  • dbms/src/Interpreters/SpecializedAggregator.h
💤 Files with no reviewable changes (1)
  • dbms/src/Interpreters/AggregationCommon.h

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change replaces unaligned arena allocations with alignment-aware allocation for aggregate states, group-array nodes, and join references. It removes obsolete aggregation helpers and adds CodeRabbit review settings for matching release branches.

Changes

Alignment and aggregation changes

Layer / File(s) Summary
Group-array node allocation
dbms/src/AggregateFunctions/AggregateFunctionGroupArray.h
Group-array node allocation uses alignedAlloc with node alignment.
Aggregate-state allocation paths
dbms/src/Columns/ColumnAggregateFunction.cpp, dbms/src/DataTypes/DataTypeAggregateFunction.cpp, dbms/src/Interpreters/SpecializedAggregator.h
Aggregate-state insertion, deserialization, and specialized aggregation use required alignment. The __cxa_pure_virtual closing brace is corrected.
Join row-reference allocation
dbms/src/Interpreters/JoinPartition.cpp
Join row-reference and mapped-row allocations use aligned arena memory.
Aggregation helper cleanup
dbms/src/Interpreters/AggregationCommon.h
The unused placeKeysInPool helper and obsolete commented implementations are removed.

Review configuration

Layer / File(s) Summary
Release-branch review settings
.coderabbit.yaml
Automatic reviews are enabled for branches matching the configured release pattern.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 214aa

This change aligns aggregate, group-array, and join arena allocations to prevent misalignment crashes without changing their construction or ownership behavior. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the mirror status and immutability requirements, but it does not follow the required template. It omits the problem summary, change details, checklist selections, side effects… Add the required template sections. Include the issue number, problem summary, technical change summary, at least one applicable test or the No code option, side effects, documentation impact, and release note.
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: replacing alloc with alignedAlloc to fix a crash. The upstream PR reference adds context but does not obscure the main change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the mirror status and immutability requirements, but it does not follow the required template. It omits the problem summary, change details, checklist selections, side effects, documentation impact, and release note.

Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coderabbit/release-8.5-pr-10585-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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