Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Session leaks #957
base: main
Are you sure you want to change the base?
feat: Session leaks #957
Changes from 18 commits
9d83ef2
4d16548
920eb55
aff17b1
f271251
799589e
38f71b8
54e1717
7ed07c6
57309de
c38b15d
d678841
286e1f4
be6eee3
86a2552
c33f930
cb748d8
1b72281
ac9e0e4
ff8674d
5a09450
a75f147
9540c0a
c419204
b735e5e
2e489c4
1dccb4f
0e04dde
ee5b3a3
f8c258d
9331df2
33988c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we have a reason for not preferring minutes? From a readability point of view, minutes will be more consistent across languages. What do you think?
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.
Python sleep library expects seconds to be passed and does not support this. Also its helpful in overriding these properties to a smaller value for tests.
Seconds looks file to me.
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.
Query - I think we are doing this to flush the transaction context which we newly created. Is this the best place to flush. Are there any other place where existing properties are flushed?
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.
We are also deleting this in commit and rollback methods, apart from all these methods. https://github.com/googleapis/python-spanner/blob/main/google/cloud/spanner_v1/transaction.py#L181
https://github.com/googleapis/python-spanner/blob/main/google/cloud/spanner_v1/transaction.py#L246
Also In case of retry due to abort errors. https://github.com/googleapis/python-spanner/blob/main/google/cloud/spanner_v1/session.py#L388
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.
Where are we using the instance level configs that's newly introduced here?
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.
These are not instance level properties. Instance class has database method which ultimately calls database class and create an object. So we need to give an option to pass the database properties in this method as well.