tsuna / gohbase

Pure-Go HBase client
Apache License 2.0
737 stars 214 forks source link

region: Use a buffered reader #229

Closed aaronbee closed 1 year ago

aaronbee commented 1 year ago

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[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.07% :warning:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/tsuna/gohbase/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Benoit+Sigoure) | Coverage Δ | | |---|---|---| | [region/client.go](https://app.codecov.io/gh/tsuna/gohbase/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Benoit+Sigoure#diff-cmVnaW9uL2NsaWVudC5nbw==) | `82.88% <100.00%> (-0.08%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/tsuna/gohbase/pull/229/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Benoit+Sigoure)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.