Skip to content

[release-23.0] vreplication: prevent vttablet panic on malformed RowChange images (#20377)#20408

Open
vitess-bot[bot] wants to merge 3 commits into
release-23.0from
backport-20377-to-release-23.0
Open

[release-23.0] vreplication: prevent vttablet panic on malformed RowChange images (#20377)#20408
vitess-bot[bot] wants to merge 3 commits into
release-23.0from
backport-20377-to-release-23.0

Conversation

@vitess-bot

@vitess-bot vitess-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

This is a backport of #20377

Copilot AI review requested due to automatic review settings June 25, 2026 15:39

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vitess-bot

vitess-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Hello @timvaillancourt, there are conflicts in this backport.

Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually.

Make sure you replace origin by the name of the vitessio/vitess remote

git fetch --all
gh pr checkout 20408
git reset --hard origin/release-23.0
git cherry-pick -m 1 9774a3872c2a2efaa780b0fa8a7779041c30a988

release-23.0 lacks the bulk-insert/marshal tests and benchmarks that
exist on main, so the cherry-pick conflicted on surrounding context.
Keep the branch's existing test file and add only the TestApplyBulkDeleteChanges
test that PR #20377 introduced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt removed Skip CI Skip CI actions from running Merge Conflict labels Jun 25, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt marked this pull request as ready for review June 25, 2026 17:26
Copilot AI review requested due to automatic review settings June 25, 2026 17:26

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines +264 to +268
log.Error("caught panic",
slog.String("workflow", workflow),
slog.String("where", where),
slog.Any("panic", x),
slog.String("stack", string(tb.Stack(4))),
Comment on lines 601 to 602
vals := sqltypes.MakeRowTrusted(tp.Fields, rowDelete.Before)
if pkIndex == -1 {
for i := range vals {
if tp.PKIndices[i] {
pkIndex = i
break
}
}
}
addedSize := int64(len(vals[pkIndex].Raw()) + 2) // Plus 2 for the comma and space
@promptless

promptless Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Promptless prepared a documentation update related to this change.

Triggered by PR #20408 (backport of #20377)

Added a changelog entry documenting the VReplication fix that prevents a vttablet panic on malformed RowChange images (the bulk-delete primary-key index lookup and the runWithRecover goroutine guard).

Review: vreplication: prevent vttablet panic on malformed RowChange images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants