Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highpower/issue 215 fix #1

Open
wants to merge 200 commits into
base: master
Choose a base branch
from

Conversation

highpower
Copy link

No description provided.

nicktorwald and others added 27 commits April 19, 2019 14:52
Add missed checks on methods of the closed connection.

Closes: #72
Affects: #119, #74
Add await-versions of start/stop commands for TarantoolControl class.
Improve the waiting process with an extra monitoring PID of a running
Tarantool-instance using terminal kill -0 command

Fixes: #164
Added java-8 (LTS) and java-12 (most recent) JDKs, removed openjdk10
(EOL) and oraclejdk11.

The idea is to test against widely used JDKs (LTS ones) and also against
a most recent JDK (to catch possible problems with new versions of java
early).

OracleJDK is built from OpenJDK starting from java-7, so there is no
much need to test against it.
Relax a socket provider contract. Now socket provider can throw a
transient error and the client will try to obtain a socket again instead
of being closed.

Make built-in socket providers configurable. Now the client can set
retries count and connection timeout for providers.

Update README doc im scope of new socket provider contract.

Closes: #167
Follows on: #144
- Add new CI targets for the following TNT versions: 1.9, 1.10, 2x,
  and 2.2 against JDKs versions 8, 11, and 12.
- Add assume-style checks to skip Tarantool version incompatible tests.
- Update testing tools versions in POM.
- Update 'Building' section of README file how to run test w\o SQL part.

Closes: #52, #143
Replace obsolete TarantoolConnection with TarantoolClient to have an
ability to perform async operations.

Update SQLDriver URL parameters. Add init and operation timeouts.
Remove socket timeout and replace socket provider with socket channel
provider options (according to TarantoolConnection-to-TarantoolClient
transfer written above).

Add operation timeout capability to TarantoolClientImpl. It also affects
the cluster client which no more needs its own expirable operations.

Add basic support for SQLStatement (setQueryTimeout) to execute requests
with timeout using new TarantoolClient operation timeout.

Remove deprecated JDBCBridge. SQLConnection accepted the responsibility
for producing raw SQL results.

Update README doc with respect to JDBC driver options changes.

Closes: #163
Follows on: #75, #155
Implement the DataSource interface to be more compatible with JDBC spec.

Add JDBC standard and Tarantool specific properties (getters/setters) to
follow enterprise features (according to JavaBeans spec).

Fix a JDBC URL scheme. Now correct scheme has the format like
'jdbc:tarantool://' where `tarantool` is JDBC sub-protocol. Old scheme
version `tarantool://` was not JDBC-compatible.

Closes: #175
The JDBC standard requires two-bytes encoding to be returned from
getUnicodeStream.
Check a statement after all its dependent result set are closed.

Extract TarantoolStatement as tarantool specific extension interface to
be used for internal purposes (incompatible vendor API).

Closes: #180
Many test cases are scattered over test hierarchies which is hard to
answer distinctly: what the state do we have before the test? what's the
flow between test executions? and so on. Avoiding deep hierarchies
should increase a test readability.

Closes: #188
At present, the driver doesn't support any properties and must retrieve
empty data instead of raising an error with an exception for
Statement.setClientInfo which will throw ClientInfoException for any
attempts to set a property.

Closes: #74
Add support for two methods getMoreResults and its synonym
getMoreResults(CLOSE_CURRENT_RESULT). Tarantool does not support
multiple results per one query. It leads both KEEP_CURRENT_RESULT and
CLOSE_ALL_RESULTS modes are not supported by the driver.

Closes: #182
The call_16 became obsolete when tarantool-1.6 was gone. There're
no reasons to continue using the old version by default.

Change discovery function requirements in part of single
value support. This is done to be consistent with other Tarantool
connectors.

Closes: #196
Instead of discarding the full list of addresses when at least one
address does not match the format like host[:port] a discoverer just
skips the broken address and carries on processing.

Closes: #195
Implement several ResultSetMetaData methods to be able be run as a
proper JDBC-driver inside Base tool.

Reworked SQL data types in relation with Tarantool NoSQL types as well
as JDBC types. A data conversations are left out of this commit.

This issue also addresses to tarantool/tarantool#3292 to be executed
in a dry-run mode. LibreOffice Base uses PreparedStatement.getMetadata()
without a real query execution to extract a metadata in advance. This
causes NPE in #198.

Follows on: #198
Now, CONNECTED_PATTERN has become multi lined that allows the console to
skip extra lines before the connected one (for instance, warning lines).
Also unexpected 'enter' command was removed which produced errors in
the output.
Add support for JDBC batch updates. It includes an implementation of
Statement.*Batch(...) as well as PreparedStatement.*Batch() methods.

Under the hood SQLConnection uses the pipelining sending requests one by
one asynchronously and awaiting all of them. There are some issues
regarding vinyl storage engine where execution order are not specified
and DDL statements which are not transactional.

Closes: #62
Implement corresponding API related to poolable statements. This hint
is ignored and used to be compatible with the API.

Closes: #181
Parse the 'generated_ids' array which is returned after successful
INSERT command has applied. This makes sense when a table primary key
has an autoincrement property. The driver always returns a predefined
result set with a single-column table (column name is 'GENERATED_KEYS')
where each row is one generated value.

Closes: #77
Add a capability to limit resultSet values of character or binary types.

Closes: #189
@nicktorwald nicktorwald force-pushed the highpower/issue-215-fix branch from 49447f1 to a5d441c Compare August 22, 2019 11:37
Tarantool client uses java.nio.ByteBuffer to represent a payload to be
sent through the network. JDK 9 introduces a number of new methods that
override java.nio.Buffer methods in order to return ByteBuffer instead
of Buffer. Because of overriding, those methods are available in JRE 8
or below but cannot be invoked if the connector is built using JDK 9 or
above using new signatures for methods overridden. To be compatible
with JREs before 9, it possible to cast ByteBuffer to Buffer class
explicitly. As a result, a method will be called which is available in
older versions but it breaks conciseness of the code.

Closes: #215
@nicktorwald nicktorwald force-pushed the highpower/issue-215-fix branch from a5d441c to 43d72df Compare August 22, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.