Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Issue - 134 : Fix for session leak issue#135

Merged
stephenplusplus merged 11 commits intogoogleapis:masterfrom
honeyscience:AB-SessionLeakFix
Mar 8, 2018
Merged

Issue - 134 : Fix for session leak issue#135
stephenplusplus merged 11 commits intogoogleapis:masterfrom
honeyscience:AB-SessionLeakFix

Conversation

@anupbaldawa
Copy link
Copy Markdown
Contributor

#134

Description:
Fixing the session leak issue. The session was removed from the reads_ or writes_ array but it was not added to borrowed_ array immediately. Due to which, there would be a time where a session is not present in either writes_ or reads_ or borrowed_. This causes the code to create new session as it concludes that 1 session is missing. Hence, the code is always creating session, maxing out the total connections to be made to spanner which eventually locks the database as we cannot create any new connections

…_ or writes_ array but it was not added to borrowed_ array immediately. Due to which, there would be a time where a session is not present in either writes_ or reads_ or borrowed_. This causes the code to create new session as it concludes that 1 session is missing. Hence, the code is always creating session, maxing out the total connections to be made to spanner which eventually locks the database as we cannot create any new connections
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2018
@googlebot
Copy link
Copy Markdown

Thanks for your pull request. t looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Feb 28, 2018
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2018
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 28, 2018

Codecov Report

Merging #135 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #135   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        1394   1398    +4     
=====================================
+ Hits         1394   1398    +4
Impacted Files Coverage Δ
src/session-pool.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ec165d...3b64323. Read the comment docs.

@googlebot googlebot removed the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2018
@DuaneGarber
Copy link
Copy Markdown

We are working on getting the Corporate CLA set up on our side .... This should be ready in a few hours.

@stephenplusplus stephenplusplus added the cla: yes This human has signed the Contributor License Agreement. label Mar 1, 2018
var index = self.borrowed_.indexOf(session);
self.borrowed_.splice(index, 1);
// session is borrowed but not released, it will cause a session leak.
self.release(session);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@googlebot googlebot removed the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2018
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2018
@googlebot googlebot removed the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2018
@anupbaldawa
Copy link
Copy Markdown
Contributor Author

@callmehiphop Update the PR.

@ghost ghost assigned stephenplusplus Mar 6, 2018
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Mar 6, 2018
@googlebot googlebot removed the cla: yes This human has signed the Contributor License Agreement. label Mar 6, 2018
@anupbaldawa
Copy link
Copy Markdown
Contributor Author

Corporate CLA was signed on Mar 05, 2018 11:04 PST

@googlebot
Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@stephenplusplus
Copy link
Copy Markdown
Contributor

@alexander-fenster we'll probably need help checking the CLA.

@alexander-fenster
Copy link
Copy Markdown
Contributor

The bot complains that there are two people who contributed to this PR: the original author @anup-honey and @stephenplusplus who merged the latest changes from master to this branch. That may look a little bit weird but we need @anup-honey to confirm here that they are OK with their commits being merged :) @anup-honey, please reply OK here if so. After that, after @callmehiphop approves, we're good to go.

@stephenplusplus
Copy link
Copy Markdown
Contributor

@alexander-fenster check the CLA bots logs so far, though. It doesn't seem to have ever recognized the CLA from @anup-honey.

Regarding the line: "stephenplusplus added the cla: yes label 5 days ago" -- no idea what that's about.

@anupbaldawa
Copy link
Copy Markdown
Contributor Author

I signed the Corporate CLA on Mar 05, 2018 11:04 PST.
I confirmed that by going to https://cla.developers.google.com/clas.
Do you want me to push a fake/empty commit so that the bot can recognize my CLA?

@alexander-fenster
Copy link
Copy Markdown
Contributor

@anup-honey @DuaneGarber you said you have signed the corporate CLA, what's the name of the corporation so that I could check it internally? Thanks!

@anupbaldawa
Copy link
Copy Markdown
Contributor Author

@alexander-fenster The name is "Honey Science Corporation"

@alexander-fenster
Copy link
Copy Markdown
Contributor

@anup-honey Yes, then you're good to go. Just waiting for @callmehiphop to approve the changes :) Thanks!

@alexander-fenster alexander-fenster added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Mar 6, 2018
@ghost ghost assigned callmehiphop Mar 8, 2018
@stephenplusplus stephenplusplus merged commit 97f3f0a into googleapis:master Mar 8, 2018
@ghost ghost removed the cla: yes This human has signed the Contributor License Agreement. label Mar 8, 2018
@stephenplusplus stephenplusplus mentioned this pull request Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants