-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Spanner: ResultSet from session keep-alive request is not closed. #6330
Copy link
Copy link
Closed
Labels
api: spannerIssues related to the Spanner API.Issues related to the Spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Activity
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the Spanner API.Issues related to the Spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
When I ran an application using google-cloud-spanner 1.30.0 with opencensus-impl 0.23.0, I noticed this log message:
It looks like this is caused by the session keep-alive request:
google-cloud-java/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
Lines 790 to 796 in ca141fc
If I understand correctly, the ResultSet contains a ResumableStreamIterator, which contains the span representing the request. The issue is that keepAlive doesn't call close on the ResultSet, so the span is never ended. Calling close on the ResultSet seems to fix the issue.