Commit Graph

144 Commits

Author SHA1 Message Date
Justin Bertram 57aacf784c NO-JIRA fix lgtm.com warnings
Warnings enumerated at
https://lgtm.com/projects/g/apache/activemq-artemis/alerts/?mode=tree&severity=warning
2019-01-17 22:30:28 +00:00
Francesco Nigro 158227fcf3 ARTEMIS-2202 Improve MSSQL support for JDBC storage 2018-12-13 13:54:13 -06:00
Francesco Nigro 46542fb230 ARTEMIS-1980 Warn on failed check of table existence should be info
DB2 metadata checks should erroneously report stale table existence on
not existing/just deleted table, making the subsequent warning logs
of failed SELECT COUNT useless and scaring: should be better to let
them lowered to INFO level
2018-11-02 10:19:35 -04:00
Francesco Nigro 2967df6a99 ARTEMIS-1996 MappedSequentialFileFactory may cause DirectByteBuffer off-heap memory leaks
Compaction is now reusing direct ByteBuffers on both
reading and writing with explicit and deterministic
release to avoid high peak of native memory utilisation
after compaction.
2018-10-22 09:16:15 +02:00
yang wei 8f4bd7c621 ARTEMIS-2102 delete paging directory or table if address is removed 2018-10-10 18:50:11 -04:00
gtully 30c88fc679 ARTEMIS-2110 allow a lease renew without update to the expiry timestamp. Fix intermittent failure of org.apache.activemq.artemis.core.server.impl.jdbc.JdbcLeaseLockTest#shouldRenewAcquiredLock 2018-10-10 18:44:46 -04:00
Francesco Nigro cfa3290209 ARTEMIS-2090 JDBC Journal is not deleting TX records
JDBCJournalImpl::cleanupTxRecords is not committing
the deleteJournalTxRecords statement leaving the
TX records into the journal
2018-09-19 15:32:03 -04:00
Francesco Nigro ead9b00757 ARTEMIS-2089 DB2 sending larger message (1MB) crashes the whole server
It declares JDBC journal Blobs for IBM DB2 DBMS matching max-blob-size
in order to allow to store data with size > 1 MB ie the default BLOB
capacity
2018-09-18 11:46:47 +01:00
Justin Bertram 41b094df2b ARTEMIS-2051 add trace logging for JDBC
Activate by enabling TRACE logging for:
org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver
This doesn't log *all* JDBC operations, just those that are used by the
JDBC store.
2018-08-28 11:28:18 -04:00
Martyn Taylor b36a1058d4 ARTEMIS-2056 Set write position on JDBCFile copy 2018-08-27 12:57:04 +01:00
Clebert Suconic 63e6cd98f8 ARTEMIS-2046 Fixing issues with JournalStorageManager.stop in replication, JDBC and shared storage 2018-08-20 21:25:57 -04:00
Martyn Taylor af90bc5f43 Make OpenFile Thread Safe 2018-08-10 13:35:23 +01:00
Martyn Taylor 06f6892454 ARTEMIS-1992 Make JDBC File Lock map thread safe 2018-07-31 14:22:58 -04:00
Francesco Nigro bdcef5a68f ARTEMIS-1981 JDBCJournalImpl constructor isn't using tableName parameter
Removed the unused/redundant constructor parameter tableName
2018-07-12 12:40:42 -04:00
Francesco Nigro 79ff3432d5 ARTEMIS-1979 Table names with DB2 should be upper-cases
DB2 JDBC driver fail to retrieve metadata information
if table names are lower-cases: similarly to Oracle, better
force any table name to be upper-cases to avoid broker being
unable to restart when lower-cases table names are used
2018-07-12 14:48:39 +02:00
Clebert Suconic af56b67e38 [maven-release-plugin] prepare for next development iteration 2018-05-16 11:03:26 -04:00
Clebert Suconic bcaa11c2ee [maven-release-plugin] prepare release 2.6.0 2018-05-16 11:03:14 -04:00
Francesco Nigro fdb63df392 ARTEMIS-1784 JDBC NodeManager should just use DMBS clock
It avoid using the system clock to perform the locks logic
by using the DBMS time.
It contains several improvements on the JDBC error handling
and an improved observability thanks to debug logs.
2018-04-18 09:54:34 -04:00
Francesco Nigro 998be38348 ARTEMIS-1813 DB2 should avoid Blob to append data
DB2 10.5 doesn't allow to append Blob data to an existing Blob,
producing unexpected errors: a custom DB2 sequential file
can perfom the append by using a customized UPDATE statement.
max-blob-size.db2 and create-file-table.db2 are changed to match the
2 GB max blob size limit allowed by DB2.
2018-04-17 11:44:44 -04:00
Francesco Nigro 3d30a98b23 ARTEMIS-1810 JDBCSequentialFileFactoryDriver should check <=0 read length
In order to avoid out of bounds reads to happen, the reading of the file
should avoid those readings to hit the DMBS and just return the expected
value.
2018-04-17 10:43:28 -04:00
Francesco Nigro c7651853cd ARTEMIS-1653 Allow database tables to be created externally
The previous commit about this feature wasn't using the row count query
ResultSet.
The mechanics has been changed to allow the row count query
to fail, because DROP and CREATE aren't transactional and immediate
in most DBMS.
It includes a test that stress its mechanics if used with DBMS like
DB2 10.5 and Oracle 12c.
Additional checks and logs have been added to trace each steps.
2018-04-17 10:41:14 -04:00
Francesco Nigro 469d6baa93 ARTEMIS-1788 JDBC HA should use JDBC Network Timeout
JdbcNodeManager is configured to use the same network timeout
value of the journal and to validate all the timeout values
related to a correct HA behaviour.
2018-04-17 10:40:20 -04:00
Francesco Nigro bbb2f708dd ARTEMIS-1806 JDBC Connection leaks
The JDBC Connection leaks on:
- JDBCFileUtils::getDBFileDriver(DataSource, SQLProvider)
- SharedStoreBackupActivation.FailbackChecker::run on a failed awaitLiveStatus
2018-04-17 10:38:53 -04:00
Niels Lippke b95afbf936 ARTEMIS-1653 Allow database tables to be created externally
In some environments it is not allowed to create a schema
by the application itself. With this change the AbstractJDBCDriver
now tests if an existing table is empty and executes further
statements in the same way as if the table does not exist.
2018-03-27 10:12:14 -04:00
Francesco Nigro 8842ac3638 ARTEMIS-1757 Improve DB2 compatibility
It includes:
- Fixed AUTO_INCREMENT not supported on DB2
- Added proper stop/teardown of driver
- Fixed recursive SQLException formatting
2018-03-27 09:59:56 -04:00
saurabhrai f045ffbcf8 ARTEMIS-370: Make JDBC Journal Sync period configurable 2018-03-22 16:29:00 -04:00
Clebert Suconic 920af19adb [maven-release-plugin] prepare for next development iteration 2018-03-12 12:46:27 -04:00
Clebert Suconic 5f5b1dcf8f [maven-release-plugin] prepare release 2.5.0 2018-03-12 12:46:16 -04:00
Benjamin Graf 722ef6aa6c ARTEMIS-1660: Remove oracle12 autoincrement from column id for journal tables 2018-03-06 18:47:52 -05:00
Clebert Suconic 61a1123ee1 ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp) 2018-01-18 20:55:00 -06:00
Jeff Mesnil 938fbd81cb [ARTEMIS-1590] Properties-based SQLProvider
Replace GenericSQLProvider and other implementation by a single
PropertySQLProvider that uses properties to define SQL queries.

SQL queries are loaded from the journal-sql.properties file.
Queries specific to a DB dialect can be specified by adding a suffix to
the key of the generic property.
For example, the generic property to create a file Table is:

create-file-table = CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, ...)

This property can be customized for Derby by using the
create-file-table.derby  property:

create-file-table.derby=CREATE TABLE %s (ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),...

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1590
2018-01-12 14:50:21 +01:00
Francesco Nigro 170e89f9fc ARTEMIS-1541 Make the JDBC Node Manager more resilient on failures
In order to make the JDBC Node Manager more resilient has been implemented:
- recovering with fixed number of retries during the NodeId setup + unrecoverable failure otherwise
- unrecoverable fail on exceptions while renewing a lease lock

In addition, in different parts of these critical processes are added more log informations to help diagnose.
2017-12-20 16:03:19 -05:00
Justin Bertram 55d7260a07 ARTEMIS-1510 refactor Maven poms
Clean up unused declared dependencies and undeclared dependencies which
are pulled in transitively.
2017-11-13 17:03:35 -05:00
Justin Bertram 8703d9d51d [maven-release-plugin] prepare for next development iteration 2017-11-01 00:38:57 -05:00
Justin Bertram ec63189a0a [maven-release-plugin] prepare release 2.4.0 2017-11-01 00:38:56 -05:00
Justin Bertram a44b9d5edf [maven-release-plugin] prepare for next development iteration 2017-10-31 12:09:43 -05:00
Justin Bertram 34a7431d1b [maven-release-plugin] prepare release 2.4.0 2017-10-31 12:07:55 -05:00
Francesco Nigro 09a5d6f1c6 ARTEMIS-1447 JDBC NodeManager to support JDBC HA Shared Store 2017-10-26 15:38:37 -04:00
Martyn Taylor 988c91557d ARTEMIS-1444 Support Messages > JournalBufferSize in all Protocols 2017-10-09 12:50:38 -04:00
Clebert Suconic 30ba65a082 NO-JIRA: Fixing the testsuite on Page.finalize() 2017-10-07 12:05:55 -04:00
Clebert Suconic c8982d775b [maven-release-plugin] prepare for next development iteration 2017-09-05 17:03:48 -04:00
Clebert Suconic 84d5ac65b4 [maven-release-plugin] prepare release 2.3.0 2017-09-05 17:03:37 -04:00
Clebert Suconic ed1b268d42 [maven-release-plugin] prepare for next development iteration 2017-08-31 13:48:09 -04:00
Clebert Suconic 21f2a4a52c [maven-release-plugin] prepare release 2.3.0 2017-08-31 13:47:57 -04:00
Clebert Suconic fdad83be22 [maven-release-plugin] prepare for next development iteration 2017-07-24 21:21:18 -04:00
Clebert Suconic 71b1cc2a20 [maven-release-plugin] prepare release 2.2.0 2017-07-24 21:21:06 -04:00
Martyn Taylor 604db9ee7e ARTEMIS-1204 Replace open sync with AtomicBoolean
The JDBCSequentialFile blocks on the writeLock when opening.  There is
no need to block here, in fact it may cause issues when opening and
syncing concurrently.  Instead an AtomicBoolean is enough to prevent the
file from being reloaded.
2017-06-26 18:41:21 +01:00
Martyn Taylor e7c426c5e1 ARTEMIS-1204 Fix getSize() on a closed JDBC File 2017-06-02 14:59:53 +01:00
Erich Duda 69740a987d ARTEMIS-1190 Long/int type mismatch in JDBCSequentialFile.setWritePosition 2017-05-30 18:59:33 -04:00
Michael Andre Pearce c65ea783ea ARTEMIS-1189 - Fix checkstyle violations post checkstyle upgrade
After upgrade of checkstyle, resolve violations

remove checkstyle override added as temp measure at point of upgrade forced by sevntu
2017-05-30 13:40:00 -04:00