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

region: Use a buffered reader #229

Merged
merged 1 commit into from
Aug 15, 2023
Merged

region: Use a buffered reader #229

merged 1 commit into from
Aug 15, 2023

Conversation

aaronbee
Copy link
Collaborator

Wrap connection in a bufio.Reader for reading RPC responses from RegionServer. This should reduce the number of read system calls by attempting to fill a 4KB buffer on each read.

Some mock tests that expected certain sizes of buffers passed to Read() had to be made more lenient.

Wrap connection in a bufio.Reader for reading RPC responses from
RegionServer. This should reduce the number of read system calls by
attempting to fill a 4KB buffer on each read.

Some mock tests that expected certain sizes of buffers passed to
Read() had to be made more lenient.
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.07% ⚠️

Comparison is base (5800f86) 70.29% compared to head (b90acea) 70.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #229      +/-   ##
==========================================
- Coverage   70.29%   70.22%   -0.07%     
==========================================
  Files          27       27              
  Lines        3720     3718       -2     
==========================================
- Hits         2615     2611       -4     
- Misses        988      991       +3     
+ Partials      117      116       -1     
Files Changed Coverage Δ
region/client.go 82.88% <100.00%> (-0.08%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aaronbee aaronbee requested a review from dethi August 15, 2023 22:30
Copy link
Collaborator

@dethi dethi left a comment

Choose a reason for hiding this comment

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

Nice find!

@dethi dethi merged commit ee1a6d3 into tsuna:master Aug 15, 2023
3 of 4 checks passed
@aaronbee aaronbee deleted the readbuffer branch August 15, 2023 23:20
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.

2 participants