Repository navigation
Reduce retained CN logtail replay batch memory - #31574
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? |
|
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: b3de9eb96ec1ae38e7a75c52935c17458a877d4c
Assessment: approve
The scoped retention optimization preserves replay ownership, row identity/time, affected readers and logical size accounting. No actionable unresolved findings.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Reviewed all 11 changed files, affected consumers, publication and cleanup paths, both discussion entries, and linked issue context.
-
Static checks passed for frozen-source identity, patch consistency, whitespace, Go formatting and discussion coverage. Receipt: checks/1793189785666549231-4.json; retained log: static-review-check.log.
-
Reused supplied current-head CI results reporting successful build, UT, SCA, coverage and multi-CN BVT checks. Skipped checks were not counted as passes.
-
Saved review-plan.md, review-evidence.md, discussion-assessment.json and validation-evidence.json; source remained unchanged.
Limitations:
-
No local Go, SQL, race or performance tests were run. Raw author test/benchmark receipts and CI per-test logs were not supplied.
-
Production memory savings and throughput remain unquantified. This approval does not establish resolution of the linked issue's separate oversized-WAL/DN-panic failure.
🚫 Left the queue33 min in the queue, with no time running CI. So far
Reason Pull request #31574 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Merge conditions: 2 of 3 metThis pull request
The batch, tested in place
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #31350, specifically the CN logtail replay memory investigation. This does not claim to fix the issue's original oversized-WAL/DN-panic failure; those failures have not been shown to have the same cause.
What this PR does / why we need it:
PartitionStatekeeps one decoded logtail batch pointer per in-memory row. Previously, the retained insert batch also held RowID and commit-timestamp vectors even though eachRowEntryalready stores both values. Tombstone batches retained additional vectors although later readers need only the PK. If even one row from a batch remains live, these vectors remain live too.This change clears the redundant insert vectors after replay, retains only the tombstone PK vector, and updates the affected read and size-accounting paths to use
RowEntry.RowID/RowEntry.Time. It reuses the existing batch header and vector slice, so the optimized path introduces no additional per-batch allocations. It does not change the logtail wire format or persistent object format. Regression tests cover compact/legacy tombstone reads, in-memory insert reads, hidden RowID and statistics sizing.Validation and performance:
10.222.1.55, the fullpkg/vm/engine/disttae/logtailreplayandpkg/vm/engine/disttaetest packages passed at the exact committed source diff. Test binaries were built locally and executed remotely; no tests were run locally for this final validation.