Skip to content

Terminal errors don't correctly complete a refresh operation #2205

@enocom

Description

@enocom

See GoogleCloudPlatform/alloydb-java-connector#669 where we discovered that a terminal exception will leave the refresh operation operation state with refreshRunning set to true. This prevents future connection attempts from succeeding once the terminal state has resolved.

Key fix is here:

https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/core/src/main/java/com/google/cloud/sql/core/RefreshAheadStrategy.java#L277-L280

There needs to be this:

synchronized (connectionInfoGuard) {
          refreshRunning = false;
}

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions