- Fix incorrect code snippet in docstrings.
- Add
httpClientBuilder
attribute toQldbDriverBuilder
to support use of custom HTTP clients.- The following code demonstrates how to use it:
QldbSessionClientBuilder sessionClientBuilder = QldbSessionClient.builder(); QldbDriver qldbDriver = QldbDriver .builder() .ledger(ledger) .maxConcurrentTransactions(poolLimit) .transactionRetryPolicy(TransactionRetryPolicy.builder().maxNumberOfRetries(retryLimit).build()) .sessionClientBuilder(sessionClientBuilder) .httpClientBuilder(ApacheHttpClient.builder().maxConnections(maxConnections)) .build();
- Note: The maximum connections set in the HTTP client should be equal or greater than the
maxConcurrentTransactions
to avoid connection contentions leading to poor performance.
- The following code demonstrates how to use it:
- Update AWS SDK dependency version to 2.15.79 which supports CapacityExceededException. This will better inform users that they are overloading their ledger.
- Update Ion dependency version to 1.8.0 which fixes a bug where the binary reader was throwing an error when the user requested more data than available.
- Improved retry logic:
- Now handles retrying on failure to start a session.
- Reduce latency by lowering the number of calls to determine session health.
- Fix broken GitHub links in POM.xml.
Add support for obtaining basic server-side statistics on individual statement executions.
- Added
IOUsage
andTimingInformation
classes to provide server-side execution statistics- IOUsage provides
long getReadIOs()
- TimingInformation provides
long getProcessingTimeMilliseconds()
- Added
IOUsage getConsumedIOs()
andTimingInformation getTimingInformation()
to theResult
interface implemented byBufferedResult
andStreamResult
IOUsage getConsumedIOs()
andTimingInformation getTimingInformation()
methods are stateful, meaning the statistics returned by them reflect the state at the time of method execution
- IOUsage provides
This is a public and generally available(GA) release of the driver, and this version can be used in production applications.
The release candidate version 2.0.0-rc.2 has been selected as a final release of v2.0.0. No new changes have been introduced between 2.0.0-rc.2 and 2.0.0.
- Fixed bug which may lead to infinite number of retries when a transaction expires.
- Fixed bug which causes transaction to remain open when an unknown exception is thrown inside execute.
- Added a limit to the number of times the driver will try to get (from pool)/create a session.
We are adding new changes to the QLDB Driver for Java. However Java driver 1.x will still be maintained and supported until further notice. We recommend to move to the version 2.0 as it improves the performance and transaction management.
- Added the
getTableNames
method to theQldbDriver
class. For more details please read the release notes. - Added a
RetryPolicy
for transactions. Now, the driver accepts aRetryPolicy
instead of the retryLimit that allows you to define the number of retry attempts and the backoff strategy.
- Session pooling functionality moved to
QldbDriver
. For more details please read the release notes. - Upgraded dependency from the AWS SDK for Java v1 to the AWS SDK for Java v2. Note, the current driver version v1.x is still supported and this version doesn't deprecate it. For more details please read the release notes.
- Fixed the issue where two different Ion Java packages were present in the classpath.
-
PooledQldbDriver
has been removed. Please useQldbDriver
instead. For more details please read the release notes. -
QldbSession
andTransaction
classes have been removed. Please useQldbDriver
instead. For more details please read the release notes. -
QldbDriver.execute(String)
method has been removed as we found it made the driver confusing about when to use one execute method over the other. Please useQldbDriver .execute(ExecutorNoReturn executor)
method orQldbDriver.execute(Executor executor)
instead. -
The
RetryIndicator
has been removed in favor of theRetryPolicy
. -
PooledQldbDriverBuilder.poolTimeout
has been removed. We consider that it was confusing and decided to remove it as it addded marginal value. -
PooledQldbDriverBuilder.poolLimit
has been renamed toQldbDriverBuilder.maxConcurrentTransactions
. We made this change as we think that makes the driver easier to understand and use.
1.1.0 - 2020-03-20
- Add the execute method to the
PooledQldbDriver
. - Use varargs on the execute methods to pass Ion parameters.
1.0.2 - 2019-12-17
- Bump version of the AWS SDK to 1.11.649
- Fix an issue that will make the driver throw an
InvalidSessionException
when executing a transaction. In the initial release of the driver, if a session becomes invalid while using thePooledQldbSession
'sexecute
convenience methods, then the transaction will fail completely for the caller, as theInvalidSessionException
is re-thrown. To prevent the caller from needing to write additional retry logic, theexecute
methods will now transparently replace an invalid session with a new one and retry the transaction but still be limited to the number of retries configured.
1.0.1 - 2019-10-31
- Provides a layer on top of the AWS SDK for Java called
driver
that simplifies how to execute transactions with QLDB. - Includes a Pooled driver that manages the sessions.
- Provides an execute method that starts a session, sends PartiQL statements to QLDB, and commits the transaction (or aborts the transaction in the case of errors). Additionally, retries OptmisticConcurrencyControlExceptions and hashes the PartiQL statements with its parameters on client's behalf in order to commit the transaction.