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

util/codec: add EncodedBytesLength #15170

Merged
merged 6 commits into from
Mar 15, 2020

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Mar 6, 2020

This helper function can be used in encodeHashDataKey, encodeHashMetaKey etc, to estimate the key size more accurately.

@sre-bot sre-bot added the contribution This PR is from a community contributor. label Mar 6, 2020
@codecov
Copy link

codecov bot commented Mar 6, 2020

Codecov Report

Merging #15170 into master will decrease coverage by 0.1775%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #15170        +/-   ##
================================================
- Coverage   80.4183%   80.2408%   -0.1776%     
================================================
  Files           502        503         +1     
  Lines        133324     132303      -1021     
================================================
- Hits         107217     106161      -1056     
- Misses        17692      17746        +54     
+ Partials       8415       8396        -19

@zhiqiangxu zhiqiangxu changed the title add EncodedBytesLength util/codec: add EncodedBytesLength Mar 6, 2020
util/codec/bytes.go Outdated Show resolved Hide resolved
@zhiqiangxu zhiqiangxu force-pushed the add_EncodedBytesLength branch from 9c61323 to 9767072 Compare March 6, 2020 10:18
Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

This helper function can be used in encodeHashDataKey, encodeHashMetaKey etc, to estimate the key size more accurately.

@zhiqiangxu please also update these two places to use this function.

@zz-jason zz-jason added status/LGT1 Indicates that a PR has LGTM 1. status/require-change labels Mar 15, 2020
@zhiqiangxu
Copy link
Contributor Author

This helper function can be used in encodeHashDataKey, encodeHashMetaKey etc, to estimate the key size more accurately.

@zhiqiangxu please also update these two places to use this function.

Applied to these two places.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. status/require-change labels Mar 15, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 15, 2020

/run-all-tests

@sre-bot sre-bot merged commit 892dced into pingcap:master Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/util contribution This PR is from a community contributor. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants