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

Don't restart scanner renewer on every Next call #281

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Don't restart scanner renewer on every Next call #281

merged 2 commits into from
Dec 31, 2024

Conversation

aaronbee
Copy link
Collaborator

Most calls to Next are just reading some buffered results. The scanner renewer only needs to be stopped and started again when we ask for more results from HBase. Also, we shouldn't start a renewer if we know we have already fetched the final results.

@aaronbee aaronbee force-pushed the renew branch 2 times, most recently from 7b7d801 to e21effc Compare December 30, 2024 19:04
Copy link
Contributor

@gogochickenleg gogochickenleg left a comment

Choose a reason for hiding this comment

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

LGTM!

scanner.go Outdated Show resolved Hide resolved
@aaronbee aaronbee force-pushed the renew branch 2 times, most recently from 2131baa to 15a3846 Compare December 30, 2024 21:52
Most calls to Next are just reading some buffered results. The scanner
renewer only needs to be stopped and started again when we ask for
more results from HBase. Also, we shouldn't start a renewer if we know
we have already fetched the final results.

Pass in client's logger to scanner.

Use renewLoop's ctx in renew().

Doubled scannerLease sleeps in integration tests to reduce flakiness
of tests.
This can be used to identify scanner leaks.
@aaronbee aaronbee merged commit bed85a0 into master Dec 31, 2024
2 checks passed
@aaronbee aaronbee deleted the renew branch December 31, 2024 00:23
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