Skip to content

[4.2-dev] fix: preserve BOOL ZoneMap correctness - #32724

Merged
mergify[bot] merged 6 commits into
matrixorigin:4.2-devfrom
ck89119:issue-32720-4.2-dev
Nov 14, 2026
Merged

mergify[bot] merged 6 commits into
matrixorigin:4.2-devfrom
ck89119:issue-32720-4.2-dev

Conversation

@ck89119

@ck89119 ck89119 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #32720

What this PR does / why we need it:

Port only the BOOL correctness closure from main #29527 (f6eb974d5a), without its unrelated Cartesian DML or statistics changes.

  • Calculate the BOOL maximum with OR, not AND, in both nullable and non-nullable vector summaries. Mixed false/true input must not be summarized as false/false.
  • Protect historical persisted BOOL summaries at column, ZoneMap-area and object-sort-key read boundaries. Legacy false/false bounds may hide true values, so expose a conservative private view without mutating shared metadata or expression/constant ZoneMaps.
  • Preserve exact raw writer serialization, including genuinely all-false new blocks. No disk-format or protocol change is introduced.
  • Add vector, metadata, physical write/read and real readutil consumer regressions. Extend the existing six-row persisted SQL fixture to check independent left/right counts and matched/left-only/right-only FULL OUTER JOIN output with default and disabled block filters.

Validation on 4.2-dev@1d90e5197c, macOS/arm64, Go 1.26.4, CPU mode:

  • Exact-baseline overlays fail the new vector/legacy-metadata and readutil regressions. A real six-row SQL probe reproduces the unfixed failure after flush: both filtered inputs are empty and FULL OUTER JOIN returns no rows; disabling block filters restores two rows per input and all three expected join rows. The fixed binary returns correct results in both modes.
  • Complete vector, objectio, objectio/ioutil, tae/index and readutil owning/consumer packages pass. Focused race validation, 100 repetitions of the metadata-view regression and the complete objectio race suite pass.
  • Service builds, scoped go vet and golangci-lint 2.6.2 pass (0 lint issues).
  • mo-tester generated the updated expectations; reviewed output contains only the new BOOL results. Two normal runs of optimizer/non_primary_zonemap.sql pass 92/92 each, with independent database-teardown checks between runs.
  • Changed-production-line-intersecting coverage is 24/24 statements (100%), not whole-package or branch coverage.

Compatibility tradeoff: historical mixed and genuinely all-false BOOL bounds are indistinguishable without writer provenance. Conservative reads may scan additional all-false blocks rather than lose true rows. Only the ambiguous BOOL view is copied; other metadata paths remain unchanged.

Limits: the original 100M/three-CN workload, Linux CI and customer-scale performance have not been rerun. The minimal reproduction proves the current-branch failure mechanism, not that #32419 is the original incident's uniquely bisected introducing commit.

@XuPeng-SH XuPeng-SH 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.

mo-bot review · mo-bot-local · review

Commit: fe80d3092b09c6b3d79c5a6158098e2bf13396fe

Assessment: approve

The BOOL summary fix preserves pruning correctness for legacy persisted data while keeping writer bytes exact. It reuses the vector/index and objectio owners; the BOOL MAX scan fallback and physical-column extrema helper are necessary because conservative bounds cannot supply exact values. Source tracing, independent SQL-oracle checks and supplied current-head CI support approval, with no unresolved actionable findings.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Reviewed the complete 16-file delta, all three discussion_index entries and linked issue 32720. discussion-assessment.json accounts for every discussion key.

  • Traced vector summaries through persistent column, sort-key and ZoneMap-area readers and raw serialization; checked aggregate fallback callers, sequential object iteration, context/error propagation and loaded-column release ownership. Maintained tests cover legacy/new bounds, nulls, immutable metadata, pruning, exact extrema and public SQL consumers.

  • Local source/fixture/evidence audit passed through check-run: source-audit.log and source-audit.json, receipt checks/1794594810966249423-2.json, exit 0 at the frozen clean head. Independently derived 25 SQL result sets and checked a 358-case nullable BOOL model; this was not Go or database execution.

  • Reused evidence.json's head-bound successful CI records for shared build, Ubuntu/x86 UT and coverage, Linux/arm64 SCA and multi-CN pessimistic BVT. The later CI Required completed successfully at 2026-11-13T18:00:48Z; earlier cancellation/failure records and skipped upgrade checks were not counted as passes.

  • Reviewed the author's reported baseline/fixed six-row SQL comparison, normal BVT comparisons and targeted persistence/race checks as supporting evidence for the pruning correction. The initial report's 24-statement coverage claim was not extended to the later compile/disttae changes.

  • Final schema, receipt/log, source fingerprint and discussion-coverage reconciliation is retained in review-audit.log.

Limitations:

  • No local Go tests or database service were run. The supplied CI snapshot contains aggregate outcomes rather than per-test raw logs; later exact-value consumer changes rely on current-head CI, maintained regression cases and source reasoning.

  • Legacy and current all-false persisted summaries are indistinguishable without writer provenance, so their conservative views can scan extra blocks. Exact BOOL column summaries now read physical values; this necessary correctness cost was not benchmarked here.

  • The original 100M-row, three-CN workload and customer performance were not reproduced; approval does not claim that stress run or identify a unique historical introducing commit.

@mergify mergify Bot added the queued label Nov 13, 2026
@mergify

mergify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

❌ Left the queue · Matrixone CI execution / UT Test on Ubuntu/x86 fails with this pull request

57 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Fri 13 Nov, 18:37 · rule release-4.2 · triggered by rule Automatic queue on approval for release-4.2
  • ❌ Checks failed · in place
  • 🚫 Left the queue 19:34 · ec8005e

The failure is in this pull request. It failed tested alone on top of 4.2-dev.

Reason

The merge conditions cannot be satisfied due to failing checks

  • CI Required

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, tick the box below to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub branch protection:
    • check-neutral = CI Required
    • check-skipped = CI Required
    • check-success = CI Required

Requeue requested — the merge queue status continues in this comment ↓.

2 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection

Times in UTC · dashboard · how the merge queue works

@mergify

mergify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into 4.2-dev as 2fdaef9 at 07:55 UTC

1 h 17 min in the queue, 1 h 15 min of it CI.

So far

  • ✅ Entered the queue Sat 14 Nov, 06:38 · rule release-4.2 · triggered by rule Automatic queue on approval for release-4.2
  • ✅ Passed · in place
  • ✅ Merged 07:55 · 2fdaef9 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — 2400264b Deployed Nov 14, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants