atlassian-labs / db-replica

Automatically chooses between database connections to read-write main or read-only replica
Apache License 2.0
10 stars 11 forks source link

AuroraMultiReplicaConsistency#isConsistent always calls replica connection supplier #142

Closed wyrzyk closed 2 years ago

wyrzyk commented 2 years ago

Even if replicaConsistency for a single replica doesn't require a connection (for example uses an internal cache to determine consistency), the connection is fetched from the connection pool by replica.getConnectionSupplier().

This bug can lead to higher utilization of the connection pool.