All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog. This project adheres to Semantic Versioning.
The API consists of all public Java types from com.atlassian.db.replica.api
, com.atlassian.db.replica.spi
and their subpackages:
- source compatibility
- binary compatibility
- behavioral compatibility with behavioral contracts expressed via Javadoc
Changing the license is breaking a contract. Adding a requirement of a major version of a dependency is breaking a contract. Dropping a requirement of a major version of a dependency is a new contract.
- Connection leak in
AuroraClusterDiscovery
- Support for custom connection provider for replica discovery in
AuroraMultiReplicaConsistency
- Changed discovery query to use Longs instead of Integers
LazyLogger
toAuroraMultiReplicaConsistency
- Add additional logging to
AuroraMultiReplicaConsistency
2.9.4 - 2023-06-28
- Default
getClientInfo()
method inDualConnection
to use read connection
2.9.2 - 2023-06-26
- Default
getMetaData()
method inDualConnection
to use read connection
2.9.0 - 2022-10-10
ReadReplicaConnectionCreationException
2.8.0 - 2022-10-04
- Logger for tracking
DualConnection
internal actions
2.7.2 - 2022-09-20
- Set connection runtime parameters, after switching to the main connection (cover uppercase SET)
- Don't call
DirtyConnectionHook
after rollback
2.7.0 - 2022-09-08
- Add
DirtyConnectionCloseHook
2.6.4 - 2022-07-01
- Ignore replica nodes when the topology state for the node was not updated for 5 minutes.
2.6.2 - 2022-04-20
- AuroraMultiReplicaConsistency#isConsistent always calls replica connection supplier
2.6.0 - 2022-01-26
- Support for
clusterUri
inAuroraMultiReplicaConsistency
2.5.6 - 2021-12-20
- Set connection runtime parameters, after switching to the main connection
2.5.4 - 2021-10-27
Statement#getConnection()
returnsDualConnection
instead of the main database connectionConnection#createArrayOf()
uses replica connection
2.5.2 - 2021-10-26
- Support
SELECT FOR NO KEY UPDATE
statement - Support
SELECT FOR SHARE
statement - Support
SELECT FOR KEY SHARE
statement
2.5.0 - 2021-10-25
- Add support for sequences to ThrottledCache
2.4.0 - 2021-10-11
- Add
spi.Logger
2.3.4 - 2021-09-23
- Run
insert
queries on the main database
- Run
insert
queries on the main database
2.3.2 - 2021-09-15
- Connection leak in
AuroraMultiReplicaConsistency
2.3.0 - 2021-09-08
- Add
Database
- Add
ReplicaConnectionPerUrlProvider
2.2.6 - 2021-09-08
- Additional caching in
AuroraMultiReplicaConsistency
2.2.4 - 2021-09-02
- Reverted fix connection leak in
AuroraClusterDiscovery
2.2.2 - 2021-09-01
- Fix connection leak in
AuroraClusterDiscovery
2.2.0 - 2021-08-31
- Add
AuroraMultiReplicaConsistency
- Add
AuroraConnectionDetails
2.1.4 - 2021-07-08
- Only one thread can update
Throttled Cache
values - Remove all assumptions from
DualConnection#close
and always close all sub-connections - Fix connection leak
- Close replica connection on
ReplicaConsistency#isConsistent
exception
2.1.2 - 2021-07-01
- Fix
Throttled Cache
lock release mechanism
2.1.0 - 2021-06-30
- Add timeout to
ThrottledCache
2.0.0 - 2021-06-17
- Allow getting cached value from
SuppliedCache
without executing a supplier
- Make
PessimisticPropagationConsistency
class final - Make
ThrottledCache
class final - Make
NoCacheSuppliedCache
class final - Add
SuppliedCache#get
- Add
NoCacheSuppliedCache#get
- Add
ThrottledCache#get
1.3.0 - 2021-04-21
ReplicaConsistency#preWrite()
1.2.6 - 2021-04-19
- No circuit breaker by default.
- Implemented missing methods in
Statement
1.2.4 - 2021-04-15
- Support
SELECT FOR UPDATE SKIP LOCKED
statement
1.2.2 - 2021-04-06
- Implemented missing methods in
DualConnection
1.2.0 - 2021-04-01
ThrottledCache
SuppliedCache<T>
1.1.0 - 2021-03-18
AuroraPostgresLsnReplicaConsistency
1.0.0 - 2021-03-15
DualConnection.Builder.stateListener()
StateListener
State
DualConnection.Builder.circuitBreaker()
CircuitBreaker
BreakerState
0.1.31 - 2021-03-10
-RouteDecision#mustRunOnMain()
and RouteDecision#willRunOnMain()
- clarified read/write Reasons
Reason.isWrite()
0.1.30 - 2021-03-09
- Add support for compatibility mode
Connection#nativeSQL
uses replica database
0.1.29 - 2021-03-01
Connection#close
can cause an exception.
0.1.28 - 2021-02-26
- Initialize connection once
- Propagate read-only mode immediately
0.1.27 - 2021-02-23
- Propagate the read-only mode to the main connection
- Reset the read-only mode before releasing a connection
0.1.26 - 2021-02-18
- Set connection properties while switching to replica
- Exclude Sequence Manipulation Functions from read-only functions
0.1.25 - 2021-02-18
- Add support for read-only functions
- Avoid unnecessary switch to
MainConnection
while settingread-only
mode - Statement Behavior changes don't affect DualConnection's state
0.1.24 - 2021-02-16
- Add
COMMITED_MAIN
state - Add
DualConnection#Builder.databaseCall
- Add
spi.DatabaseCall
- Add
RouteDecision
andReason
for per query visibility
spi.DualCall
DualConnection#Builder.dualCall
0.1.23 - 2021-02-09
- Add
State#getName
method.
0.1.22 - 2021-02-05
- Add
PessimisticPropagationConsistency.Builder
. - Add
StateListener
.
- Remove
ReplicaConsistency.assumePropagationDelay
. UsePessimisticPropagationConsistency.Builder
instead.
0.1.21 - 2021-01-08
No changes.
0.1.20 - 2021-01-08
- Propagate
Consistency#write
when the same statement used first withexecuteQuery
and then withexecuteUpdate
.
0.1.19 - 2021-01-05
- Avoid unnecessary consistency writes.
0.1.18 - 2020-12-17
- Don't assume inconsistency forever, when no writes happen.
0.1.17 - 2020-12-16
spi.ConnectionProvider#getMainConnection()
throwsSQLException
spi.ConnectionProvider#getReplicaConnection()
throwsSQLException
- Complex queries wrongly run on the main database
0.1.16 - 2020-12-16
DualCall
calls main when the replica is not consistent.
0.1.15 - 2020-12-07
- NPE when calling
DualConnection#isReadOnly
0.1.14 - 2020-12-07
spi.ReplicaConsistency#isConsistent(Connection replica)
tospi.ReplicaConsistency#isConsistent(Supplier<Connection> replica)
- Avoid fetching replica connections when not needed.
0.1.13 - 2020-12-02
- Release connection's reference on close
- Keep
close
related contract inDualConnection
API - Make
close
safe - Release
Statement
when closed - Keep
close
related contract inStatement
API - Keep
close
related contract inPreparedStatement
API
0.1.12 - 2020-11-27
- Inject
Cache
to allow multiple ways of holding the "last write to main". - Add
ReplicaConsistency.assumePropagationDelay
. - Add
Cache.assumePropagationDelay.cacheMonotonicValuesInMemory
.
0.1.11 - 2020-11-27
- implementation of
Connection#setSavepoint
- implementation of
Connection#rollback(Savepoint savepoint)
- implementation of
Connection#releaseSavepoint(Savepoint savepoint)
0.1.10 - 2020-11-26
- Handle multiple calls for
setReadOnly
0.1.9 - 2020-11-25
- Assign deletes to the main connection for
executeQuery
calls - Keep using the main connection
setReadOnly
determines connection
api.circuitbreaker.DualConnectionException
- throw original exception instead of
DualConnectionException
0.1.8 - 2020-11-25
- Hiding
Connection#close
failure - Assign updates to the main connection for
executeQuery
calls
0.1.7 - 2020-11-25
- implementation of
Statement#setEscapeProcessing
- implementation of
Statement#setMaxRows
- implementation of
Statement#setMaxFieldSize
- implementation of
Statement#setFetchDirection
- implementation of
Statement#setPoolable
- implementation of
Statement#setLargeMaxRows
- dependency on
jcip-annotations
- dependency on
postgresql
- dependency on
commons-lang3
- dependency on
atlassian-util-concurrent
impl.LsnReplicaConsistency
0.1.6 - 2020-11-23
- Add
spi.circuitbreaker.CircuitBreaker
0.1.5 - 2020-11-23
- Support for single connection provider
0.1.4 - 2020-11-20
- Use
net.jcip:jcip-annotations:1.0
instead ofcom.github.stephenc
0.1.3 - 2020-11-20
-
implementation of
Connection#isWrapperFor
-
implementation of
Connection#unwrap
-
implementation of
Connection#getSchema
-
implementation of
Connection#createArrayOf
-
implementation of
Connection#isValid
-
implementation of
Connection#getHoldability
-
implementation of
Connection#setHoldability
-
implementation of
Connection#getTypeMap
-
implementation of
Connection#setTypeMap
-
implementation of
Connection#getCatalog
-
implementation of
Connection#setCatalog
-
implementation of
Connection#getWarnings
-
implementation of
Connection#clearWarnings
-
implementation of
Connection#getTransactionIsolation
-
implementation of
Statemtent#unwrap
-
implementation of
Statemtent#isWrapperFor
-
implementation of
Statemtent#clearBatch
-
implementation of
Statemtent#addBatch
-
implementation of
Statemtent#getMoreResults
-
implementation of
Statemtent#getUpdateCount
-
implementation of
Statemtent#getResultSet
-
implementation of
Statemtent#getWarnings
-
implementation of
Statemtent#clearWarnings
-
NPE in
ReplicaStatement#isClosed
0.1.2 - 2020-11-18
- Renamed:
api.SqlConnection
toapi.SqlCall
spi.DualConnectionOperation
tospi.DualCall
impl.ForwardConnectionOperation
toimpl.ForwardCall
impl.PrintfDualConnectionOperation
toimpl.TimeRatioPrinter
0.1.0 - 2020-11-18
- Add
api.DualConnection
,api.SqlConnection
- Add
spi.DualConnectionOperation
,spi.ReplicaConsistency
,spi.ConnectionProvider
- Add
impl.ClockReplicaConsistency
,impl.LsnReplicaConsistency
- Add
impl.ForwardConnectionOperation
,impl.PrintfDualConnectionOperation