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

br/lightning: add byte reader implementation #45724

Merged
merged 12 commits into from
Aug 4, 2023

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Aug 1, 2023

Issue Number: ref #45719

Problem Summary: N/A

What is changed and how it works?

Add the byte reader implementation.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 1, 2023
@tiprow
Copy link

tiprow bot commented Aug 1, 2023

Hi @tangenta. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #45724 (a4017dd) into master (2d23240) will increase coverage by 0.1462%.
Report is 23 commits behind head on master.
The diff coverage is 81.8181%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #45724        +/-   ##
================================================
+ Coverage   73.2176%   73.3638%   +0.1462%     
================================================
  Files          1267       1275         +8     
  Lines        390724     393755      +3031     
================================================
+ Hits         286079     288874      +2795     
- Misses        86299      86480       +181     
- Partials      18346      18401        +55     
Flag Coverage Δ
integration 78.1388% <ø> (?)
unit 73.3556% <81.8181%> (+0.1380%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0359% <ø> (-0.0109%) ⬇️
br 52.1024% <81.8181%> (+0.1012%) ⬆️

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

we still need r.reset? otherwise data will always be cloned once. With reset retPointers can be released earlier.

rest lgtm

@tangenta
Copy link
Contributor Author

tangenta commented Aug 2, 2023

/hold for further changes.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 2, 2023
@tangenta
Copy link
Contributor Author

tangenta commented Aug 3, 2023

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 3, 2023
@@ -93,6 +93,10 @@ func (r *byteReader) readNBytes(n int) (*[]byte, error) {
return &auxBuf, nil
}

func (r *byteReader) reset() {
Copy link
Contributor

Choose a reason for hiding this comment

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

not important: we can also set elements to nil before truncate the retPointers

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe also add more reset() in unit tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Aug 3, 2023
@ywqzzy
Copy link
Contributor

ywqzzy commented Aug 3, 2023

/cc @ywqzzy

@ti-chi-bot ti-chi-bot bot requested a review from ywqzzy August 3, 2023 04:04
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 3, 2023

@ywqzzy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 4, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, wjhuang2016, ywqzzy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [lance6716,wjhuang2016]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 4, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-03 02:58:01.218984677 +0000 UTC m=+326965.161333207: ☑️ agreed by lance6716.
  • 2023-08-04 06:34:21.781527669 +0000 UTC m=+426345.723876199: ☑️ agreed by wjhuang2016.

@ti-chi-bot ti-chi-bot bot merged commit a82c8ff into pingcap:master Aug 4, 2023
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants