-
Notifications
You must be signed in to change notification settings - Fork 6k
executor, sqlexec: add a function to let DrainRecordSet also close the RecordSet #61448
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
Conversation
Welcome @Whitea029! |
Hi @Whitea029. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
Hi @Whitea029. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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-sigs/prow repository. |
/ok-to-test |
This comment was marked as resolved.
This comment was marked as resolved.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #61448 +/- ##
================================================
+ Coverage 73.1839% 73.5759% +0.3919%
================================================
Files 1727 1729 +2
Lines 479899 482284 +2385
================================================
+ Hits 351209 354845 +3636
+ Misses 107194 105969 -1225
+ Partials 21496 21470 -26
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
2bddf07
to
63f8476
Compare
/retest |
/cc @YangKeao |
[LGTM Timeline notifier]Timeline:
|
/hold @YangKeao PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, lance6716, YangKeao 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:
Approvers can indicate their approval by writing |
/unhold |
/retest |
/test check-dev |
@Whitea029: The specified target(s) for
Use 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-sigs/prow repository. |
/retest |
1 similar comment
/retest |
What problem does this PR solve?
This PR addresses the enhancement suggestion regarding repetitive patterns when using DrainRecordSet. Previously, callers needed to manually defer the closing of the RecordSet after execution, which introduced boilerplate and risked forgetting to close the resource.
Issue Number: close #61408
Problem Summary:
What changed and how does it work?
This change introduces a new utility function DrainRecordSetAndClose, which automatically drains and closes the RecordSet, simplifying the common usage pattern and improving code readability and safety. Existing code that follows the defer Close() pattern can now be replaced with a single call to this new function.
Check List
Tests
Side effects
Documentation
Release note