Skip to content

fix: BigtableSession is never closed by Reader causing "ManagedChanne…#2782

Merged
kolea2 merged 2 commits into
googleapis:masterfrom
dmitry-fa:ManagedChannel_2658
Dec 29, 2020
Merged

fix: BigtableSession is never closed by Reader causing "ManagedChanne…#2782
kolea2 merged 2 commits into
googleapis:masterfrom
dmitry-fa:ManagedChannel_2658

Conversation

@dmitry-fa

Copy link
Copy Markdown
Contributor

Fixes #2658

@dmitry-fa dmitry-fa requested a review from a team December 28, 2020 13:16
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2020
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the googleapis/java-bigtable-hbase API. label Dec 28, 2020

@VisibleForTesting
protected void setSession(BigtableSession session) {
void setSession(BigtableSession session) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are we changing the visibility of these methods?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As I can see, these methods are introduced for the sake of testability, they are not supposed to be invoked not by tests,
so there is no reason for them to belong to the public API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it - since this is not required for this fix, let's revert these and maybe revisit the public surface in a different issue/PR just in case this would inadvertently break something :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree, fixing multiple issues in the same commit is not a good practice.
Restored, please take a look when you have time


@VisibleForTesting
protected void setSession(BigtableSession session) {
void setSession(BigtableSession session) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it - since this is not required for this fix, let's revert these and maybe revisit the public surface in a different issue/PR just in case this would inadvertently break something :)

@kolea2 kolea2 merged commit 5340db5 into googleapis:master Dec 29, 2020
@kolea2

kolea2 commented Dec 30, 2020

Copy link
Copy Markdown
Contributor

Opened #2785 to track this for 1.x branch as well

vermas2012 pushed a commit to vermas2012/java-bigtable-hbase that referenced this pull request Jan 1, 2021
googleapis#2782)

* fix: BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions

* fix: BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions
kolea2 pushed a commit to kolea2/cloud-bigtable-client that referenced this pull request Mar 5, 2021
googleapis#2782)

* fix: BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions

* fix: BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions

(cherry picked from commit 5340db5)
kolea2 added a commit to kolea2/cloud-bigtable-client that referenced this pull request Mar 8, 2021
igorbernstein2 pushed a commit that referenced this pull request Mar 9, 2021
baeminbo added a commit to baeminbo/java-bigtable-hbase that referenced this pull request Dec 12, 2022
* Reader.close(): fixes googleapis#2658 where original fix googleapis#2782 was rolled back by googleapis#2871 and googleapis#2873. As we don’t use “session” here anymore, I believe we should close “connection” here.
* AbstractCloudBigtableTableDoFn.tearDown(): If an exception happened in ProcessElement, FinishBundle is not executed. We should clean up resources in TearDown. You can see the similar code with BigQueryIO apache/beam#14949.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable-hbase API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions

2 participants