Skip to content

fix(mysql): classify event checksum error#4537

Merged
dtunikov merged 2 commits into
mainfrom
fix/DBI-830/m1-binlog-crc32-checksums-stripped-but-never-verified
Jul 7, 2026
Merged

fix(mysql): classify event checksum error#4537
dtunikov merged 2 commits into
mainfrom
fix/DBI-830/m1-binlog-crc32-checksums-stripped-but-never-verified

Conversation

@dtunikov

@dtunikov dtunikov commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

verify event checksum and throw binlon invalid error if invalid

@dtunikov
dtunikov requested a review from a team as a code owner July 6, 2026 12:42
@dtunikov dtunikov changed the title classify event checksum mysql error fix(mysql): classify event checksum error Jul 6, 2026
}
}

if strings.Contains(err.Error(), replication.ErrChecksumMismatch.Error()) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

kinda hard to emulate this one on e2e level
but this if statement should handle an error go-mysql returns (it wraps it with %v so we have to assert with string.Contains)

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.

Can test with the debug image and

SET GLOBAL source_verify_checksum = 0;
SET GLOBAL debug = '+d,corrupt_read_log_event';

But yeah, no need for programmatic tests as we can trust go-mysql here

@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

}
}

if strings.Contains(err.Error(), replication.ErrChecksumMismatch.Error()) {

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.

Can test with the debug image and

SET GLOBAL source_verify_checksum = 0;
SET GLOBAL debug = '+d,corrupt_read_log_event';

But yeah, no need for programmatic tests as we can trust go-mysql here

@dtunikov
dtunikov merged commit 6d1c07f into main Jul 7, 2026
18 checks passed
@dtunikov
dtunikov deleted the fix/DBI-830/m1-binlog-crc32-checksums-stripped-but-never-verified branch July 7, 2026 06:56
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.

3 participants