Skip to content

Releases: tarantool/tarantool-java

1.9.4

27 Nov 16:53
connector-1.9.4
32c6b14
Compare
Choose a tag to compare

Overview

This release offers support of a space / an index names in requests. We also
support update and upsert operations that use field names. See details
below.

Breaking changes

This release should not break existing code.

New features

Space / index names

Supported requests using a space / an index name in addition to a numeric
identifier (#7, #137).

Say, the following request:

client.syncOps().select(512, 0, Collections.singletonList(1),
                        0, 1, Iterator.EQ);

Now can be written in this way:

client.syncOps().select("my_space", "primary", Collections.singletonList(1),
                        0, 1, Iterator.EQ);

The client now keeps an actual schema on its side and guarantees that space /
index names are always resolved against an actual schema (not older than
server's schema at the moment when a request is registered on the client).

Consider String space/index resolution for details how schema reload
works.

Field names

Aside of that we verified that update and upsert operations with field
names work correctly with the connector (at least in 1.9.3 and 1.9.4
versions). This feature was introduced in tarantool-2.3.0-72-g9ee5cf82a
(#220).

Say, when a space has the following format:

tarantool> unpack(box.space.my_space:format())
---
- {'name': 'id', 'type': 'unsigned'}
- {'name': 'value', 'type': 'string'}
...

The following request:

client.syncOps().update("my_space", Collections.singletonList(1),
                        Arrays.asList("=", 2, "hello"));

Can be written in this way (when using tarantool-2.3.0.72 or above):

client.syncOps().update("my_space", Collections.singletonList(1),
                        Arrays.asList("=", "value", "hello"));

Consider the documentation issue for more information about this feature.

1.9.3

20 Nov 10:47
connector-1.9.3
18a088a
Compare
Choose a tag to compare

Overview

In this release we're move toward better support of JDBC API (except features
that requires support on a server side).

The notable feature is support of logging. Consider README for more
information how to use it with your logging system.

Breaking changes

Misc

  • Use CALL iproto command by default instead of old CALL_16 (#196).
  • Cluster client: because of the change above a cluster discovery function
    should always return a list of strings: a singleton return value will not be
    automatically wrapped into an array anymore (#196).
  • Cluster client: the driver filters out ill-formatted addresses got from a
    cluster discovery function rather then discarding a whole result. This change
    is made for consistency with tarantool-python's MeshConnection (#195).

JDBC (alpha)

  • Updated URL parameters (#163):
    • Replaced socketProvider with socketChannelProvider.
    • Replaced socketTimeout with loginTimeout and queryTimeout.
  • Fixed the URI scheme: the new jdbc:tarantool:// is JDBC compliant, while
    old tarantool:// is not (#175).

New features

Misc

  • Added operationExpiryTimeMillis configuration parameter (1 second by
    default) (#163).
  • Added TarantoolException.isTransient() method (PR #217).
  • Supported logging to JUL, SLF4J (logback) or a custom logger (#194). The
    driver gives warnings on ill-formed cluster discovery addresses, on
    reconnects. The driver allows to trace delayed and reissued requests, but
    does not show them on a default log level.

JDBC (alpha)

  • Supported java.sql.Connection methods (#75, #155):
    • isValid(int timeout).
  • Supported java.sql.Statement methods (#163):
    • getQueryTimeout();
    • setQueryTimeout(int seconds).
  • Supported javax.sql.DataSource interface: a factory for connections (#175).
  • Supported java.sql.ResultSet methods (#179):
    • wasNull().
  • Supported java.sql.Statement methods (#180):
    • closeOnCompletion();
    • isCloseOnCompletion().
  • Provide metadata for ResultSets given by java.sql.DatabaseMetadata methods
    (#74).
  • Supported java.sql.Connection methods (#74).
    • getClientInfo(String name);
    • getClientInfo();
      The driver does not support any property at the moment, but now it conforms
      the standard: it gives null as an unknown property value and raises an error
      at attempt to set such property.
  • Supported java.sql.Statement methods (#182):
    • getMoreResults();
    • getMoreResults(int current).
      The driver only supports Statement.CLOSE_CURRENT_RESULT value as the argument
      for the latter method. Tarantool does not support queries with multiple
      statements at the moment, so those methods will always return false. The
      methods were implemented to conform the standard.
  • Supported all java.sql.ResultSetMetaData methods: they provide a name / type
    information where possible or return a predefined value otherwise (#198).
  • Supported batching of DML requests. The followingjava.sql.Statement and
    java.sql.PreparedStatement methods are implemented (#62):
  • Supported java.sql.Statement and java.sql.PreparedStatement methods
    (#181):
    • isPoolable();
    • setPoolable(boolean poolable).
      The driver allows to get and set the hint, but ignores it. This is needed to
      be compatible with the standard.
  • Supported java.sql.Connection methods (#77):
    • prepareStatement(sql, autoGeneratedKey) for RETURN_GENERATED_KEYS as the
      second argument. NO_GENERATED_KEYS was already supported.
  • Supported java.sql.Statement methods (#189):
    • getMaxFieldSize();
    • setMaxFieldSize(int size).
  • Supported new Tarantool/SQL types that were introduced in Tarantool 2.2
    release: UNSIGNED, VARBINARY, NUMBER (BOOLEAN and BOOL were already
    supported). Those types now will be correctly handled by
    java.sql.ResultSetMetaData methods. INTEGER and UNSIGNED types now mapped
    to BIGINT JDBC type rather then INTEGER one (#67, #92, #209, #210).
  • Supported java.sql.PreparedStatement methods (#190):
    • setAsciiStream(<...>);
    • setUnicodeStream(<...>);
    • setBinaryStream(<...>);
    • setCharacterStream(<...>);
    • setNCharacterStream(<...>).
      Those methods allows to bind a string or a binary value that is obtained
      from an InputStream or Reader instance. The driver materializes the streams
      in memory, so using this API will not give performance benefits. Tarantool
      usually used for relatively short pieces of data, so this should not be a
      problem for most cases (see #219 for the discussion).

Bugfixes

Misc

  • Fixed NoSuchMethodError on JREs before 9 (#215).
  • Provide a cause of TarantoolClientImpl connection failure (#30).

JDBC (alpha)

  • Fixed java.sql.ResultSet get*() methods to handle NULL correctly (#179).
  • Fixed NullPointerException when java.sql.PreparedStatement method
    getMetaData() is invoked before a request execution: this is not supported
    by tarantool at the moment. The driver now returns null in the case (#198).

1.9.2

19 May 19:02
connector-1.9.2
903cb42
Compare
Choose a tag to compare

Notable changes

(All user-visible changes are worth to be noted, but ones below deserve more
then one-line description.)

TarantoolClientImpl now can be created in simpler way: without user-defined
socket provider. The default socket provider can be configured with
connectionTimeout and retryCount configuration option. TarantoolClusterClient
also supports these options and applies them to one instance connection
attempts.

A user-provided socket provider still can be used to implement more complex
retry strategy. Starting from this release it gains ability to report a
transient error, so the strategy itself may be written in simpler way.

TarantoolClusterClient gains support of auto refreshing nodes list using a Lua
function defined on the Tarantool side. This feature allows to update a
cluster client with a new topology with zero downtime. It is implemented in
the general way to support a built-in Tarantool replication cluster, a set of
vshard frontends or a Tarantool Enterprise cluster.

Breaking changes

The minimal version of Tarantool to work via JDBC becomes
2.1.1-423-g4007436aa. The criteria here is passing all JDBC tests we have
currently. The version elevates from 2.1.1-372-g0d0f53aa0 in connector-1.9.1,
because of SCALAR type support for storing / fetching binary strings. Features
of the previous release should continue work with the old tarantool version.

TarantoolClusterClient doesn't use operationExpiryTimeMillis configuration
option as a connection timeout anymore, but connectionTimeout option instead.
The cluster client also applies retryCount configuration option to connection
attempts to one instance rather then to the whole attempt count.

New features

Misc

  • Added support of auto refresh a list of cluster nodes (#34).
  • Apply connection timeout for each connection attempt, apply retry count for
    each address in TarantoolClusterClient (#167).
  • Added minimal documentation for TarantoolClusterClient (see README.md).

JDBC (alpha)

  • Added support of a result set holdability (HOLD_CURSORS_OVER_COMMIT only)
    (#87).
  • Added support of isWrapperFor() and unwrap() methods (#73).
  • Improved SQLException subclasses and SQLSTATE support (#119).
  • Added support of storing and fetching binary strings from / to SCALAR fields
    (#45).
  • Added support of Connection.isValid() (#75).
  • Added support of Statement.NO_GENERATED_KEYS option (#78).
  • Added support of nullsAreSorted*() methods group (#120).
  • Added support of a result set type (FORWARD_ONLY and INSENSITIVE) and
    concurrency (READ_ONLY only) (#85, #86).

Bugfixes

Misc

  • Fixed broken SQL operations in TarantoolClientImpl and TarantoolConnection
    (regression from connector-1.9.0). JDBC is not affected. (#141)
  • Fixed race conditions in TarantoolClientImpl that could appear during
    reconnection (#142).

JDBC (alpha)

  • Raise SQLException on methods of a closed Connection (#72).

1.9.1

13 Mar 15:09
connector-1.9.1
de4f153
Compare
Choose a tag to compare

Breaking changes

The minimal version of Tarantool to work via JDBC becomes
2.1.1-372-g0d0f53aa0. The criteria here is passing all JDBC tests we have
currently.

New features

No.

Bugfixes

  • JDBC (alpha): Remove the outdated tarantool sql types (#130).
  • Fix a file descriptor leak with wrong user:pass (#132).

1.9.0

31 Jan 13:38
connector-1.9.0
6129a7f
Compare
Choose a tag to compare

Breaking changes

This release drops support of Java 1.6 and Java 1.7, because it uses
CompletableFuture internally. Java 8 is the minimal version now.

New features

  • Add the new async API with CompletionStage results (#102).

Bugfixes

No.

1.8.0

29 Jan 00:43
connector-1.8.0
694fe89
Compare
Choose a tag to compare

Breaking changes

This release should not break existing code.

New features

  • Added iterator enum to use in select() (#31).
  • Supported alpha version of JDBC API (for Tarantool 2.*).
  • Added round-robin fail-over as TarantoolClusterClient (#37).

Bugfixes

  • Fixed race between close() and reconnect() (#93).
  • Fixed BigInteger converting from/to MsgPack (#27).