Skip to content

Pax: fix delete bloom crash - #1755

Merged
yjhjstz merged 2 commits into
apache:mainfrom
yjhjstz:pax/fix-delete-bloom-crash-1749
Sep 11, 2026
Merged

yjhjstz merged 2 commits into
apache:mainfrom
yjhjstz:pax/fix-delete-bloom-crash-1749

Conversation

@yjhjstz

@yjhjstz yjhjstz commented May 18, 2026

Copy link
Copy Markdown
Member

DeleteWithVisibilityMap projected only minmax_columns into the reader, then asked UpdateStatsInAuxTable to refresh bloomfilter stats too. When a bloomfilter column was not also a minmax column, the reader did not materialize it, and MicroPartitionStats::AddRow dereferenced an uninitialized slot value, crashing the segment with SIGSEGV.

Project the union of minmax and bloomfilter column indexes, while keeping the original lists passed to UpdateStatsInAuxTable so per-stat semantics are unchanged. Hoist the GetBloomFilterColumnIndexes() call out of the per-block loop.

Fixes #1749

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@yjhjstz
yjhjstz requested a review from gongxun0928 June 25, 2026 04:44

@gongxun0928 gongxun0928 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gongxun0928
gongxun0928 force-pushed the pax/fix-delete-bloom-crash-1749 branch 2 times, most recently from a4b8642 to 7722f38 Compare July 31, 2026 05:20
@yjhjstz
yjhjstz requested a review from jiaqizho September 10, 2026 03:34

@jiaqizho jiaqizho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

DeleteWithVisibilityMap projected only minmax_columns into the reader,
then asked UpdateStatsInAuxTable to refresh bloomfilter stats too. When
a bloomfilter column was not also a minmax column, the reader did not
materialize it, and MicroPartitionStats::AddRow dereferenced an
uninitialized slot value, crashing the segment with SIGSEGV.

Project the union of minmax and bloomfilter column indexes, while
keeping the original lists passed to UpdateStatsInAuxTable so per-stat
semantics are unchanged. Hoist the GetBloomFilterColumnIndexes() call
out of the per-block loop.

Fixes apache#1749
Covers three layouts that previously crashed the segment when
bloomfilter columns were not projected by DeleteWithVisibilityMap:
  - bloomfilter column outside minmax_columns
  - bloomfilter only, no minmax
  - overlapping minmax and bloomfilter sets

Refs apache#1749
@yjhjstz
yjhjstz force-pushed the pax/fix-delete-bloom-crash-1749 branch from 7722f38 to 6881b27 Compare September 11, 2026 03:03
@yjhjstz
yjhjstz merged commit 5306ce5 into apache:main Sep 11, 2026
208 of 213 checks passed
@yjhjstz
yjhjstz deleted the pax/fix-delete-bloom-crash-1749 branch September 11, 2026 04:40
leborchuk pushed a commit that referenced this pull request Oct 1, 2026
* PAX: include bloomfilter columns in DELETE stats projection

DeleteWithVisibilityMap projected only minmax_columns into the reader,
then asked UpdateStatsInAuxTable to refresh bloomfilter stats too. When
a bloomfilter column was not also a minmax column, the reader did not
materialize it, and MicroPartitionStats::AddRow dereferenced an
uninitialized slot value, crashing the segment with SIGSEGV.

Project the union of minmax and bloomfilter column indexes, while
keeping the original lists passed to UpdateStatsInAuxTable so per-stat
semantics are unchanged. Hoist the GetBloomFilterColumnIndexes() call
out of the per-block loop.

Fixes #1749
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.

[Bug] PAX DELETE can crash with SIGSEGV when bloomfilter_columns are not included in minmax_columns

3 participants