Skip to content

fix: do not delete session in close method for BatchReadOnlyTransactionImpl #1688

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

Merged
merged 8 commits into from
Feb 15, 2022
Prev Previous commit
Next Next commit
🦉 Updates from OwlBot
  • Loading branch information
gcf-owl-bot[bot] committed Feb 14, 2022
commit cff4c73dfbb45494c76111fc7b603ca7cef2dc86
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ List<Partition> partitionQuery(
BatchTransactionId getBatchTransactionId();

/**
* Closes the session as part of the cleanup. It is the responsibility of the caller to make
* call to this method once the transaction completes execution across all the channels (which
* is understandably hard to identify). It is okay if the caller does not call the method
* because the backend will anyways clean up the unused session.
* Closes the session as part of the cleanup. It is the responsibility of the caller to make call
* to this method once the transaction completes execution across all the channels (which is
* understandably hard to identify). It is okay if the caller does not call the method because the
* backend will anyways clean up the unused session.
*/
default void cleanup() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ public void testBackendPartitionQueryOptions() {
try (ResultSet rs = transaction.execute(partitions.get(0))) {
// Just iterate over the results to execute the query.
while (rs.next()) {}
} finally {
} finally {
transaction.cleanup();
}
// Check if the last query executed is a DeleteSessionRequest and the second last query
Expand Down