-
Notifications
You must be signed in to change notification settings - Fork 261
(fix) database is locked during remove #828
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
(fix) database is locked during remove #828
Conversation
|
@gallettilance: This pull request references Bugzilla bug 2023522, which is invalid:
Comment 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. |
|
/bugzilla refresh |
|
@gallettilance: This pull request references Bugzilla bug 2023522, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: jianzhangbjz. Note that only operator-framework members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
|
|
||
| packagePropertiesQuery := `select distinct operatorbundle_name, value from properties where type = ?` | ||
| rows, err = s.db.Query(packagePropertiesQuery, registry.PackageType) | ||
| pRows, err := tx.Query(packagePropertiesQuery, registry.PackageType) |
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.
Note for reviewers: this is technically the root cause for this particular bug. Everything else seemed like good changes to make at the same time to prevent future such errors.
Codecov Report
@@ Coverage Diff @@
## master #828 +/- ##
==========================================
+ Coverage 51.46% 51.50% +0.03%
==========================================
Files 103 103
Lines 9032 9062 +30
==========================================
+ Hits 4648 4667 +19
- Misses 3510 3516 +6
- Partials 874 879 +5
Continue to review full report at Codecov.
|
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
Worked for me locally.
Ideally we'd like to have some test cases for rmStrandedBundles. I'm guessing that could have helped catch concurrent db access. This change is simple enough though and makes sense to me by itself.
|
@gallettilance: No Bugzilla bug is referenced in the title of this pull request. 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. |
|
@gallettilance also, we're not using bugzilla numbers in our upstream projects anymore. Having proper commit messages and "description of the change" is the default way of providing all the context that's needed to review this PR. |
This change ensures that connections to the database are properly closed and that no new connection is started when another has not been closed. Signed-off-by: Lance Galletti <galletti@bu.edu>
67d321e to
6658e6b
Compare
ankitathomas
left a comment
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
dinhxuanvu
left a comment
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.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anik120, ankitathomas, dinhxuanvu, gallettilance 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 |
Signed-off-by: Lance Galletti galletti@bu.edu
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs