Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-19.1: storage/engine: fix handling of 0-length varstrings in RocksDBBatchReader #36965

Merged

Conversation

petermattis
Copy link
Collaborator

I don't think this is urgent to merge for 19.1.0. On the other hand, it is an obvious bug with a simple fix and there could be a way to actually trigger it such that is has user visible effects.

Backport 1/1 commits from #36962.

/cc @cockroachdb/release


Previously, 0-length varstrings inadvertently cuased the reader to
truncate the batch repr which would usually result in a call to Next
complaining about the batch containing an unexpected number of
entries. So far, it looks like the only effect of this would be "invalid
batch" errors while using cockroach debug commands. It is possible
there is a more serious effect, though.

See #36937

Release note (bug fix): Fixed a bug in write batch decoding that could
cause "invalid batch" errors while using cockroach debug commands to
analyze data.

…ader

Previously, 0-length varstrings inadvertently cuased the reader to
truncate the batch repr which would usually result in a call to `Next`
complaining about the batch containing an unexpected number of
entries. So far, it looks like the only effect of this would be "invalid
batch" errors while using `cockroach debug` commands. It is possible
there is a more serious effect, though.

See cockroachdb#36937

Release note (bug fix): Fixed a bug in write batch decoding that could
cause "invalid batch" errors while using `cockroach debug` commands to
analyze data.
@petermattis petermattis requested review from bdarnell, tbg and a team April 19, 2019 20:57
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg
Copy link
Member

tbg commented Apr 19, 2019

LGTM

@petermattis
Copy link
Collaborator Author

TFTR! Merging on the assumption that @bdarnell will feel similarly.

@petermattis petermattis merged commit dd7c697 into cockroachdb:release-19.1 Apr 20, 2019
@petermattis petermattis deleted the backport19.1-36962 branch April 20, 2019 01:06
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.

None yet

3 participants