[JBoss JIRA] (ISPN-2980) sqlite support
by Aleksandar Kostadinov (JIRA)
[ https://issues.jboss.org/browse/ISPN-2980?page=com.atlassian.jira.plugin.... ]
Aleksandar Kostadinov updated ISPN-2980:
----------------------------------------
Attachment: (was: sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar)
> sqlite support
> --------------
>
> Key: ISPN-2980
> URL: https://issues.jboss.org/browse/ISPN-2980
> Project: Infinispan
> Issue Type: Feature Request
> Components: Loaders and Stores
> Affects Versions: 5.2.5.Final
> Reporter: Aleksandar Kostadinov
> Assignee: Mircea Markus
> Labels: cache-loader, cache-store, jdbc, sqlite
> Attachments: sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar
>
>
> It would be very nice is we have SQLite support for infinispan. SQLite is a powerful database supporting terabyte sized databases in a file with competitive performance.
> I tried to use it as a JDBC store but the best driver I find in the internet ([xerial sqlite jdbc driver|https://bitbucket.org/xerial/sqlite-jdbc]) does not implement full jdbc specification and trying to use it results in exceptions.
> I think that perhaps using the [non-jdbc wrapper sqlite4java|http://code.google.com/p/sqlite4java/] may make sense for infinispan because:
> 1. it promises better performance
> 2. it allows using the sqlite library from OS (xerial driver uses a customized build of sqlite)
> FYI here is how I setup sqlite for infinispan (unsuccessfully):
> {code}jboss as cli commands:
> /subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.xerial",driver-class-name=org.sqlite.JDBC)
> data-source add --name=SQLiteDS --connection-url="jdbc:sqlite:${sqlite.database.string}" --jndi-name=java:jboss/datasources/SQLiteDS --driver-name="sqlite"
> /subsystem=datasources/data-source=SQLiteDS:enable
> {code}
> {code}JBoss AS module definition (modules/org/xerial/main/module.xml):
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.0" name="org.xerial">
> <resources>
> <resource-root path="sqlite-jdbc.jar" />
> </resources>
> <dependencies>
> <module name="javax.api" />
> <module name="javax.transaction.api"/>
> </dependencies>
> </module>
> {code}
> {code}cache store/loader configuration snippet:
> <stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:5.2" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false" key2StringMapper="com.jboss.datagrid.chunchun.util.TwoWayKey2StringChunchunMapper">
> <dataSource jndiUrl="java:jboss/datasources/SQLiteDS" />
> <stringKeyedTable dropOnExit="false" createOnStart="true" prefix="ispn">
> <idColumn name="ID_COLUMN" type="VARCHAR(255)" />
> <dataColumn name="DATA_COLUMN" type="BLOB" />
> <timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT" />
> </stringKeyedTable>
> </stringKeyedJdbcStore>
> </loaders>
> {code}
> sql driver needs to be copied in the same directory as module.xml
> *UPDATE:* the exception is fixed with latest dev code of xerial jdbc driver, please look at comments to see remaining problems.
> The Exception I'm getting is:{code}
> 12:53:10,683 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-3) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Error while storing string key to database; key: 'user41', buffer size of value: 4918 bytes
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:253) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ...
> Caused by: java.sql.SQLException: not implemented by SQLite JDBC driver
> at org.sqlite.Unused.unused(Unused.java:29) [sqlite-jdbc-3.7.2.jar:]
> at org.sqlite.Unused.setBinaryStream(Unused.java:60) [sqlite-jdbc-3.7.2.jar:]
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBinaryStream(WrappedPreparedStatement.java:871)
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:247) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ... 73 more{code}
> The driver [does not support|http://code.google.com/p/xerial/issues/detail?id=99] setBinaryStream(), only setBytes(). Not sure if there are any other methods required by infinispan but not implemented.
> As a simple comparison between JDBC and direct storage, I tried an app that caches 3000 records of around 5k and 60000 records of around 0.5k (total of less than 60MiB). Bdbje store operation completes in less than a minute. With a local mysql server it takes 10 minutes. And this is on a machine with plenty of CPU and memory over an SSD. Unfortunately bdbje does not work clustered for me (ISPN-2968).
> So my point is that a local disk based, fast, reliable, transactional engine is highly needed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2980) sqlite support
by Aleksandar Kostadinov (JIRA)
[ https://issues.jboss.org/browse/ISPN-2980?page=com.atlassian.jira.plugin.... ]
Aleksandar Kostadinov updated ISPN-2980:
----------------------------------------
Description:
It would be very nice is we have SQLite support for infinispan. SQLite is a powerful database supporting terabyte sized databases in a file with competitive performance.
I tried to use it as a JDBC store but the best driver I find in the internet ([xerial sqlite jdbc driver|https://bitbucket.org/xerial/sqlite-jdbc]) does not implement full jdbc specification and trying to use it results in exceptions.
I think that perhaps using the [non-jdbc wrapper sqlite4java|http://code.google.com/p/sqlite4java/] may make sense for infinispan because:
1. it promises better performance
2. it allows using the sqlite library from OS (xerial driver uses a customized build of sqlite)
FYI here is how I setup sqlite for infinispan (unsuccessfully):
{code}jboss as cli commands:
/subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.xerial",driver-class-name=org.sqlite.JDBC)
data-source add --name=SQLiteDS --connection-url="jdbc:sqlite:${sqlite.database.string}" --jndi-name=java:jboss/datasources/SQLiteDS --driver-name="sqlite"
/subsystem=datasources/data-source=SQLiteDS/connection-properties=journal_mode:add(value="WAL")
/subsystem=datasources/data-source=SQLiteDS:enable
{code}
{code}JBoss AS module definition (modules/org/xerial/main/module.xml):
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.xerial">
<resources>
<resource-root path="sqlite-jdbc.jar" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.transaction.api"/>
</dependencies>
</module>
{code}
{code}cache store/loader configuration snippet:
<stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:5.2" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false" key2StringMapper="com.jboss.datagrid.chunchun.util.TwoWayKey2StringChunchunMapper">
<dataSource jndiUrl="java:jboss/datasources/SQLiteDS" />
<stringKeyedTable dropOnExit="false" createOnStart="true" prefix="ispn">
<idColumn name="ID_COLUMN" type="VARCHAR(255)" />
<dataColumn name="DATA_COLUMN" type="BLOB" />
<timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT" />
</stringKeyedTable>
</stringKeyedJdbcStore>
</loaders>
{code}
sql driver needs to be copied in the same directory as module.xml
*UPDATE:* the exception is fixed with latest dev code of xerial jdbc driver, please look at comments to see remaining problems.
The Exception I'm getting is:{code}
12:53:10,683 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-3) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Error while storing string key to database; key: 'user41', buffer size of value: 4918 bytes
at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:253) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
...
Caused by: java.sql.SQLException: not implemented by SQLite JDBC driver
at org.sqlite.Unused.unused(Unused.java:29) [sqlite-jdbc-3.7.2.jar:]
at org.sqlite.Unused.setBinaryStream(Unused.java:60) [sqlite-jdbc-3.7.2.jar:]
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBinaryStream(WrappedPreparedStatement.java:871)
at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:247) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
... 73 more{code}
The driver [does not support|http://code.google.com/p/xerial/issues/detail?id=99] setBinaryStream(), only setBytes(). Not sure if there are any other methods required by infinispan but not implemented.
As a simple comparison between JDBC and direct storage, I tried an app that caches 3000 records of around 5k and 60000 records of around 0.5k (total of less than 60MiB). Bdbje store operation completes in less than a minute. With a local mysql server it takes 10 minutes. And this is on a machine with plenty of CPU and memory over an SSD. Unfortunately bdbje does not work clustered for me (ISPN-2968).
So my point is that a local disk based, fast, reliable, transactional engine is highly needed.
was:
It would be very nice is we have SQLite support for infinispan. SQLite is a powerful database supporting terabyte sized databases in a file with competitive performance.
I tried to use it as a JDBC store but the best driver I find in the internet ([xerial sqlite jdbc driver|https://bitbucket.org/xerial/sqlite-jdbc]) does not implement full jdbc specification and trying to use it results in exceptions.
I think that perhaps using the [non-jdbc wrapper sqlite4java|http://code.google.com/p/sqlite4java/] may make sense for infinispan because:
1. it promises better performance
2. it allows using the sqlite library from OS (xerial driver uses a customized build of sqlite)
FYI here is how I setup sqlite for infinispan (unsuccessfully):
{code}jboss as cli commands:
/subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.xerial",driver-class-name=org.sqlite.JDBC)
data-source add --name=SQLiteDS --connection-url="jdbc:sqlite:${sqlite.database.string}" --jndi-name=java:jboss/datasources/SQLiteDS --driver-name="sqlite"
/subsystem=datasources/data-source=SQLiteDS:enable
{code}
{code}JBoss AS module definition (modules/org/xerial/main/module.xml):
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.xerial">
<resources>
<resource-root path="sqlite-jdbc.jar" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.transaction.api"/>
</dependencies>
</module>
{code}
{code}cache store/loader configuration snippet:
<stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:5.2" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false" key2StringMapper="com.jboss.datagrid.chunchun.util.TwoWayKey2StringChunchunMapper">
<dataSource jndiUrl="java:jboss/datasources/SQLiteDS" />
<stringKeyedTable dropOnExit="false" createOnStart="true" prefix="ispn">
<idColumn name="ID_COLUMN" type="VARCHAR(255)" />
<dataColumn name="DATA_COLUMN" type="BLOB" />
<timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT" />
</stringKeyedTable>
</stringKeyedJdbcStore>
</loaders>
{code}
sql driver needs to be copied in the same directory as module.xml
*UPDATE:* the exception is fixed with latest dev code of xerial jdbc driver, please look at comments to see remaining problems.
The Exception I'm getting is:{code}
12:53:10,683 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-3) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Error while storing string key to database; key: 'user41', buffer size of value: 4918 bytes
at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:253) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
...
Caused by: java.sql.SQLException: not implemented by SQLite JDBC driver
at org.sqlite.Unused.unused(Unused.java:29) [sqlite-jdbc-3.7.2.jar:]
at org.sqlite.Unused.setBinaryStream(Unused.java:60) [sqlite-jdbc-3.7.2.jar:]
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBinaryStream(WrappedPreparedStatement.java:871)
at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:247) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
... 73 more{code}
The driver [does not support|http://code.google.com/p/xerial/issues/detail?id=99] setBinaryStream(), only setBytes(). Not sure if there are any other methods required by infinispan but not implemented.
As a simple comparison between JDBC and direct storage, I tried an app that caches 3000 records of around 5k and 60000 records of around 0.5k (total of less than 60MiB). Bdbje store operation completes in less than a minute. With a local mysql server it takes 10 minutes. And this is on a machine with plenty of CPU and memory over an SSD. Unfortunately bdbje does not work clustered for me (ISPN-2968).
So my point is that a local disk based, fast, reliable, transactional engine is highly needed.
> sqlite support
> --------------
>
> Key: ISPN-2980
> URL: https://issues.jboss.org/browse/ISPN-2980
> Project: Infinispan
> Issue Type: Feature Request
> Components: Loaders and Stores
> Affects Versions: 5.2.5.Final
> Reporter: Aleksandar Kostadinov
> Assignee: Mircea Markus
> Labels: cache-loader, cache-store, jdbc, sqlite
> Attachments: sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar
>
>
> It would be very nice is we have SQLite support for infinispan. SQLite is a powerful database supporting terabyte sized databases in a file with competitive performance.
> I tried to use it as a JDBC store but the best driver I find in the internet ([xerial sqlite jdbc driver|https://bitbucket.org/xerial/sqlite-jdbc]) does not implement full jdbc specification and trying to use it results in exceptions.
> I think that perhaps using the [non-jdbc wrapper sqlite4java|http://code.google.com/p/sqlite4java/] may make sense for infinispan because:
> 1. it promises better performance
> 2. it allows using the sqlite library from OS (xerial driver uses a customized build of sqlite)
> FYI here is how I setup sqlite for infinispan (unsuccessfully):
> {code}jboss as cli commands:
> /subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.xerial",driver-class-name=org.sqlite.JDBC)
> data-source add --name=SQLiteDS --connection-url="jdbc:sqlite:${sqlite.database.string}" --jndi-name=java:jboss/datasources/SQLiteDS --driver-name="sqlite"
> /subsystem=datasources/data-source=SQLiteDS/connection-properties=journal_mode:add(value="WAL")
> /subsystem=datasources/data-source=SQLiteDS:enable
> {code}
> {code}JBoss AS module definition (modules/org/xerial/main/module.xml):
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.0" name="org.xerial">
> <resources>
> <resource-root path="sqlite-jdbc.jar" />
> </resources>
> <dependencies>
> <module name="javax.api" />
> <module name="javax.transaction.api"/>
> </dependencies>
> </module>
> {code}
> {code}cache store/loader configuration snippet:
> <stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:5.2" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false" key2StringMapper="com.jboss.datagrid.chunchun.util.TwoWayKey2StringChunchunMapper">
> <dataSource jndiUrl="java:jboss/datasources/SQLiteDS" />
> <stringKeyedTable dropOnExit="false" createOnStart="true" prefix="ispn">
> <idColumn name="ID_COLUMN" type="VARCHAR(255)" />
> <dataColumn name="DATA_COLUMN" type="BLOB" />
> <timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT" />
> </stringKeyedTable>
> </stringKeyedJdbcStore>
> </loaders>
> {code}
> sql driver needs to be copied in the same directory as module.xml
> *UPDATE:* the exception is fixed with latest dev code of xerial jdbc driver, please look at comments to see remaining problems.
> The Exception I'm getting is:{code}
> 12:53:10,683 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-3) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Error while storing string key to database; key: 'user41', buffer size of value: 4918 bytes
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:253) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ...
> Caused by: java.sql.SQLException: not implemented by SQLite JDBC driver
> at org.sqlite.Unused.unused(Unused.java:29) [sqlite-jdbc-3.7.2.jar:]
> at org.sqlite.Unused.setBinaryStream(Unused.java:60) [sqlite-jdbc-3.7.2.jar:]
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBinaryStream(WrappedPreparedStatement.java:871)
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:247) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ... 73 more{code}
> The driver [does not support|http://code.google.com/p/xerial/issues/detail?id=99] setBinaryStream(), only setBytes(). Not sure if there are any other methods required by infinispan but not implemented.
> As a simple comparison between JDBC and direct storage, I tried an app that caches 3000 records of around 5k and 60000 records of around 0.5k (total of less than 60MiB). Bdbje store operation completes in less than a minute. With a local mysql server it takes 10 minutes. And this is on a machine with plenty of CPU and memory over an SSD. Unfortunately bdbje does not work clustered for me (ISPN-2968).
> So my point is that a local disk based, fast, reliable, transactional engine is highly needed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2980) sqlite support
by Aleksandar Kostadinov (JIRA)
[ https://issues.jboss.org/browse/ISPN-2980?page=com.atlassian.jira.plugin.... ]
Aleksandar Kostadinov edited comment on ISPN-2980 at 4/5/13 5:25 PM:
---------------------------------------------------------------------
Haha, nice they picked up my bug report so fast! btw I had to compile the driver because that snapshot is from before the patch. There is another [small patch|https://bitbucket.org/xerial/sqlite-jdbc/issue/55/sqlitedatasource-...] for compiling with jdk7 I submitted if you can run some perf tests with it. (attaching the one I compiled for fedora 18 - [^sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar])
*UPDATE:* the driver above is updated with [this patch|https://bitbucket.org/xerial/sqlite-jdbc/issue/56/getbinarystream-i...] that is also needed. Updated description with option to run sqlite with WAL tx mode for better performance.
Anyways it seems to be working now and my quick test shows that the same thing taking over 7 minutes with PostgreSQL and just over 10 with mysql takes 20-30 seconds with sqlight. This is like the time it takes with MySQL using the MEMORY engine.
There are still significant drawbacks of this solution though:
* xerial jdbc driver does not support running on top of OS bundled sqlite library so sqlite will not be supported by Red Hat
* going through jdbc and a connection pool is still an overhead (for configuration and performance) and that is evident by the even better bdbje performance
* XA transactions are not supported by the xerial jdbc driver
was (Author: akostadinov):
Haha, nice they picked up my bug report so fast! btw I had to compile the driver because that snapshot is from before the patch. There is another [small patch|https://bitbucket.org/xerial/sqlite-jdbc/issue/55/sqlitedatasource-...] for compiling with jdk7 I submitted if you can run some perf tests with it. (attaching the one I compiled for fedora 18 - [^sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar])
Anyways it seems to be working now and my quick test shows that the same thing taking over 7 minutes with PostgreSQL and just over 10 with mysql takes 20-30 seconds with sqlight. This is like the time it takes with MySQL using the MEMORY engine.
There are still significant drawbacks of this solution though:
* xerial jdbc driver does not support running on top of OS bundled sqlite library so sqlite will not be supported by Red Hat
* going through jdbc and a connection pool is still an overhead (for configuration and performance) and that is evident by the even better bdbje performance
* XA transactions are not supported by the xerial jdbc driver
> sqlite support
> --------------
>
> Key: ISPN-2980
> URL: https://issues.jboss.org/browse/ISPN-2980
> Project: Infinispan
> Issue Type: Feature Request
> Components: Loaders and Stores
> Affects Versions: 5.2.5.Final
> Reporter: Aleksandar Kostadinov
> Assignee: Mircea Markus
> Labels: cache-loader, cache-store, jdbc, sqlite
> Attachments: sqlite-jdbc-3.7.15-SNAPSHOT-f18.jar
>
>
> It would be very nice is we have SQLite support for infinispan. SQLite is a powerful database supporting terabyte sized databases in a file with competitive performance.
> I tried to use it as a JDBC store but the best driver I find in the internet ([xerial sqlite jdbc driver|https://bitbucket.org/xerial/sqlite-jdbc]) does not implement full jdbc specification and trying to use it results in exceptions.
> I think that perhaps using the [non-jdbc wrapper sqlite4java|http://code.google.com/p/sqlite4java/] may make sense for infinispan because:
> 1. it promises better performance
> 2. it allows using the sqlite library from OS (xerial driver uses a customized build of sqlite)
> FYI here is how I setup sqlite for infinispan (unsuccessfully):
> {code}jboss as cli commands:
> /subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.xerial",driver-class-name=org.sqlite.JDBC)
> data-source add --name=SQLiteDS --connection-url="jdbc:sqlite:${sqlite.database.string}" --jndi-name=java:jboss/datasources/SQLiteDS --driver-name="sqlite"
> /subsystem=datasources/data-source=SQLiteDS:enable
> {code}
> {code}JBoss AS module definition (modules/org/xerial/main/module.xml):
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.0" name="org.xerial">
> <resources>
> <resource-root path="sqlite-jdbc.jar" />
> </resources>
> <dependencies>
> <module name="javax.api" />
> <module name="javax.transaction.api"/>
> </dependencies>
> </module>
> {code}
> {code}cache store/loader configuration snippet:
> <stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:5.2" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false" key2StringMapper="com.jboss.datagrid.chunchun.util.TwoWayKey2StringChunchunMapper">
> <dataSource jndiUrl="java:jboss/datasources/SQLiteDS" />
> <stringKeyedTable dropOnExit="false" createOnStart="true" prefix="ispn">
> <idColumn name="ID_COLUMN" type="VARCHAR(255)" />
> <dataColumn name="DATA_COLUMN" type="BLOB" />
> <timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT" />
> </stringKeyedTable>
> </stringKeyedJdbcStore>
> </loaders>
> {code}
> sql driver needs to be copied in the same directory as module.xml
> *UPDATE:* the exception is fixed with latest dev code of xerial jdbc driver, please look at comments to see remaining problems.
> The Exception I'm getting is:{code}
> 12:53:10,683 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-3) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Error while storing string key to database; key: 'user41', buffer size of value: 4918 bytes
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:253) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ...
> Caused by: java.sql.SQLException: not implemented by SQLite JDBC driver
> at org.sqlite.Unused.unused(Unused.java:29) [sqlite-jdbc-3.7.2.jar:]
> at org.sqlite.Unused.setBinaryStream(Unused.java:60) [sqlite-jdbc-3.7.2.jar:]
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBinaryStream(WrappedPreparedStatement.java:871)
> at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:247) [infinispan-cachestore-jdbc-5.2.5.Final.jar:5.2.5.Final]
> ... 73 more{code}
> The driver [does not support|http://code.google.com/p/xerial/issues/detail?id=99] setBinaryStream(), only setBytes(). Not sure if there are any other methods required by infinispan but not implemented.
> As a simple comparison between JDBC and direct storage, I tried an app that caches 3000 records of around 5k and 60000 records of around 0.5k (total of less than 60MiB). Bdbje store operation completes in less than a minute. With a local mysql server it takes 10 minutes. And this is on a machine with plenty of CPU and memory over an SSD. Unfortunately bdbje does not work clustered for me (ISPN-2968).
> So my point is that a local disk based, fast, reliable, transactional engine is highly needed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2635) Support for Total Order Multicast Transactions
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-2635?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-2635:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Support for Total Order Multicast Transactions
> ----------------------------------------------
>
> Key: ISPN-2635
> URL: https://issues.jboss.org/browse/ISPN-2635
> Project: Infinispan
> Issue Type: Feature Request
> Components: Transactions
> Reporter: Mircea Markus
> Assignee: Pedro Ruivo
> Priority: Blocker
> Fix For: 5.3.0.Alpha1, 5.3.0.Final
>
>
> Based on CloudTM's implementation.
> The Total Order based commit protocol is a multi-master scheme as currently Two Phase Commit implementation.
> This protocol relies on the concept of totally ordered delivery of messages which, informally, implies that each node which delivers a set of messages M, delivers them in the same order.
> This protocol comes with two advantages.
> 1) transactions can be committed in one phase, as they are delivered in the same order by the nodes that receive them.
> 2) it totally avoids deadlocks.
> The weakness point of this protocol is the fact that its implementation relies on a single thread per node which validates and commit transactions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2636) Support for Total Order Broadcast(TOB) Transactions
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-2636?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-2636:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Support for Total Order Broadcast(TOB) Transactions
> ---------------------------------------------------
>
> Key: ISPN-2636
> URL: https://issues.jboss.org/browse/ISPN-2636
> Project: Infinispan
> Issue Type: Feature Request
> Components: Transactions
> Reporter: Mircea Markus
> Assignee: Pedro Ruivo
> Priority: Blocker
> Fix For: 5.3.0.Alpha1, 5.3.0.Final
>
>
> The Total Order based commit protocol is a multi-master scheme as currently Two Phase Commit implementation.
> This protocol relies on the concept of totally ordered delivery of messages which, informally, implies that each node which delivers a set of messages M, delivers them in the same order.
> This protocol comes with two advantages.
> 1) transactions can be committed in one phase, as they are delivered in the same order by the nodes that receive them.
> 2) it totally avoids deadlocks.
> The weakness point of this protocol is the fact that its implementation relies on a single thread per node which validates and commit transactions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2998) NPE on shutdown: ExternalizerTableProxy already cleared
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-2998?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero commented on ISPN-2998:
---------------------------------------
2013-04-05 19:16:33,503 ERROR [RequestCorrelator] (remote-thread-1) failed marshalling rsp (SuccessfulResponse{responseValue=null} ): java.lang.NullPointerException
2013-04-05 19:16:33,503 ERROR [RequestCorrelator] (remote-thread-3) failed marshalling rsp (SuccessfulResponse{responseValue={}} ): java.lang.NullPointerException
2013-04-05 19:16:33,637 ERROR [RequestCorrelator] (remote-thread-0) failed marshalling rsp (SuccessfulResponse{responseValue={}} ): java.lang.NullPointerException
2013-04-05 19:16:33,637 ERROR [RequestCorrelator] (remote-thread-1) failed marshalling rsp (SuccessfulResponse{responseValue=null} ): java.lang.NullPointerException
2013-04-05 19:16:33,760 ERROR [RequestCorrelator] (remote-thread-1) failed marshalling rsp (SuccessfulResponse{responseValue={}} ): java.lang.NullPointerException
2013-04-05 19:16:33,760 ERROR [RequestCorrelator] (remote-thread-0) failed marshalling rsp (SuccessfulResponse{responseValue=null} ): java.lang.NullPointerException
2013-04-05 19:16:33,872 ERROR [RequestCorrelator] (remote-thread-0) failed marshalling rsp (SuccessfulResponse{responseValue=null} ): java.lang.NullPointerException
2013-04-05 19:16:33,872 ERROR [RequestCorrelator] (remote-thread-1) failed marshalling rsp (SuccessfulResponse{responseValue={}} ): java.lang.NullPointerException
2013-04-05 19:16:33,975 ERROR [RequestCorrelator] (remote-thread-0) failed marshalling rsp (SuccessfulResponse{responseValue={}} ): java.lang.NullPointerException
2013-04-05 19:16:33,975 ERROR [RequestCorrelator] (remote-thread-1) failed marshalling rsp (SuccessfulResponse{responseValue=null} ): java.lang.NullPointerException
> NPE on shutdown: ExternalizerTableProxy already cleared
> -------------------------------------------------------
>
> Key: ISPN-2998
> URL: https://issues.jboss.org/browse/ISPN-2998
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.5.Final
> Reporter: Sanne Grinovero
> Assignee: Mircea Markus
> Fix For: 5.3.0.CR1
>
>
> Apparently the method
> {code}org.infinispan.marshall.jboss.JBossMarshaller.ExternalizerTableProxy.getObjectWriter(Object){code}
> can be invoked during shutdown even when _externalizerTable_ is null, generating an NPE.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2998) NPE on shutdown: ExternalizerTableProxy already cleared
by Sanne Grinovero (JIRA)
Sanne Grinovero created ISPN-2998:
-------------------------------------
Summary: NPE on shutdown: ExternalizerTableProxy already cleared
Key: ISPN-2998
URL: https://issues.jboss.org/browse/ISPN-2998
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.2.5.Final
Reporter: Sanne Grinovero
Assignee: Mircea Markus
Fix For: 5.3.0.CR1
Apparently the method
{code}org.infinispan.marshall.jboss.JBossMarshaller.ExternalizerTableProxy.getObjectWriter(Object){code}
can be invoked during shutdown even when _externalizerTable_ is null, generating an NPE.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2992) Timeout on synchronous XSite backup can hang thread
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2992?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-2992:
--------------------------------
Fix Version/s: 5.2.6.Final
5.3.0.Alpha1
5.3.0.Final
> Timeout on synchronous XSite backup can hang thread
> ---------------------------------------------------
>
> Key: ISPN-2992
> URL: https://issues.jboss.org/browse/ISPN-2992
> Project: Infinispan
> Issue Type: Bug
> Components: Cross-Site Replication
> Affects Versions: 5.2.5.Final
> Reporter: Erik Salter
> Assignee: Mircea Markus
> Fix For: 5.2.6.Final, 5.3.0.Alpha1, 5.3.0.Final
>
>
> A thread can hang processing a synchronous XSite response if the decremented timeout value goes negative.
> This scenario can occur if backup site A takes a while in returning, exhausting the timeout value. Any subsequent backups can wait on a negative value. If the response never arrives from the JGroups layer, like due to a bridge end restarting, the future will wait forever.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ISPN-2992) Timeout on synchronous XSite backup can hang thread
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2992?page=com.atlassian.jira.plugin.... ]
Mircea Markus resolved ISPN-2992.
---------------------------------
Resolution: Done
> Timeout on synchronous XSite backup can hang thread
> ---------------------------------------------------
>
> Key: ISPN-2992
> URL: https://issues.jboss.org/browse/ISPN-2992
> Project: Infinispan
> Issue Type: Bug
> Components: Cross-Site Replication
> Affects Versions: 5.2.5.Final
> Reporter: Erik Salter
> Assignee: Mircea Markus
>
> A thread can hang processing a synchronous XSite response if the decremented timeout value goes negative.
> This scenario can occur if backup site A takes a while in returning, exhausting the timeout value. Any subsequent backups can wait on a negative value. If the response never arrives from the JGroups layer, like due to a bridge end restarting, the future will wait forever.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months