Skip to content

storage: fix accounting for orig LiveBytes in updateStatsOnResolve#80443

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/mvccStatsFix
Apr 23, 2022
Merged

storage: fix accounting for orig LiveBytes in updateStatsOnResolve#80443
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/mvccStatsFix

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Apr 23, 2022

This commit fixes a latent bug where updateStatsOnResolve's attempt to
discount the effect of the previous intent's key and value size on the
stats' LiveBytes field used the new value's size instead of the old
value's size. I've tracked this back to 92cad17.

This is currently harmless because intent value sizes never change
during intent resolution. However, this may not be the case in the
future. For instance, this will not be the case if we store local
timestamps in an MVCCValue wrapper object, as is being explored
in #77342.

This commit fixes a latent bug where `updateStatsOnResolve`'s attempt to
discount the effect of the previous intent's key and value size on the
stats' `LiveBytes` field used the new value's size instead of the old
value's size. I've tracked this back to 92cad17.

This is currently harmless because intent value sizes never change
during intent resolution. However, this may not be the case in the
future. For instance, this will not be the case if we store local
timestamps in an `MVCCValue` wrapper object, as is being explored
in cockroachdb#77342.
@nvb nvb requested a review from tbg April 23, 2022 17:10
@nvb nvb requested a review from a team as a code owner April 23, 2022 17:10
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Apr 23, 2022

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 23, 2022

Build succeeded:

@craig craig bot merged commit 14e9f31 into cockroachdb:master Apr 23, 2022
@nvb nvb deleted the nvanbenschoten/mvccStatsFix branch April 25, 2022 17:31
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