[JBoss JIRA] (ISPN-11004) SQL server exception purging data
by Viet Linh Dang (Jira)
[ https://issues.redhat.com/browse/ISPN-11004?page=com.atlassian.jira.plugi... ]
Viet Linh Dang edited comment on ISPN-11004 at 2/3/20 10:49 AM:
----------------------------------------------------------------
I have the same issue with version 9.4.16
was (Author: dvlinh):
I encountered the same issue with version 9.4.16
> SQL server exception purging data
> ---------------------------------
>
> Key: ISPN-11004
> URL: https://issues.redhat.com/browse/ISPN-11004
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 10.0.1.Final
> Reporter: Megan van de Valk
> Assignee: Ryan Emerson
> Priority: Major
>
> When using string keyed jdbc store with dialect="SQL_SERVER" a SQL exception of 'FOR UPDATE clause allowed only for DECLARE CURSOR' is thrown.
> {code:java}
> 14:57:39,444 WARN [org.infinispan.PERSISTENCE] (expiration-thread--p7-t1) ISPN000026: Caught exception purging data container!: org.infinispan.persistence.spi.PersistenceException: Failed clearing string based JDBC store
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:502)
> at org.infinispan.persistence.spi.SegmentedAdvancedLoadWriteStore.purge(SegmentedAdvancedLoadWriteStore.java:291)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$purgeExpired$8(PersistenceManagerImpl.java:522)
> at java.util.ArrayList.forEach(ArrayList.java:1257)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.purgeExpired(PersistenceManagerImpl.java:528)
> at org.infinispan.persistence.support.DelegatingPersistenceManager.purgeExpired(DelegatingPersistenceManager.java:90)
> at org.infinispan.expiration.impl.ExpirationManagerImpl.processExpiration(ExpirationManagerImpl.java:120)
> at org.infinispan.expiration.impl.ExpirationManagerImpl$ScheduledTask.run(ExpirationManagerImpl.java:282)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:285)
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:467)
> ... 14 more
> {code}
> The method initSelectOnlyExpiredRowsSql in [AbstractTableManager|https://github.com/infinispan/infinispan/blob/master...] includes a FOR UPDATE:
> {code:java}
> return String.format("%1$s WHERE %2$s < ? AND %2$s > 0 FOR UPDATE", getLoadAllRowsSql(), config.timestampColumnName());
> {code}
> It should probably be overwritten in [SQLServerTableManger|https://github.com/infinispan/infinispan/blob/master...] with
> {code:java}
> return String.format("%1$s WITH(UPDLOCK) WHERE %2$s < ? AND %2$s > 0", getLoadAllRowsSql(), config.timestampColumnName());
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months
[JBoss JIRA] (ISPN-11004) SQL server exception purging data
by Viet Linh Dang (Jira)
[ https://issues.redhat.com/browse/ISPN-11004?page=com.atlassian.jira.plugi... ]
Viet Linh Dang commented on ISPN-11004:
---------------------------------------
I encountered the same issue with version 9.4.16
> SQL server exception purging data
> ---------------------------------
>
> Key: ISPN-11004
> URL: https://issues.redhat.com/browse/ISPN-11004
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 10.0.1.Final
> Reporter: Megan van de Valk
> Assignee: Ryan Emerson
> Priority: Major
>
> When using string keyed jdbc store with dialect="SQL_SERVER" a SQL exception of 'FOR UPDATE clause allowed only for DECLARE CURSOR' is thrown.
> {code:java}
> 14:57:39,444 WARN [org.infinispan.PERSISTENCE] (expiration-thread--p7-t1) ISPN000026: Caught exception purging data container!: org.infinispan.persistence.spi.PersistenceException: Failed clearing string based JDBC store
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:502)
> at org.infinispan.persistence.spi.SegmentedAdvancedLoadWriteStore.purge(SegmentedAdvancedLoadWriteStore.java:291)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$purgeExpired$8(PersistenceManagerImpl.java:522)
> at java.util.ArrayList.forEach(ArrayList.java:1257)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.purgeExpired(PersistenceManagerImpl.java:528)
> at org.infinispan.persistence.support.DelegatingPersistenceManager.purgeExpired(DelegatingPersistenceManager.java:90)
> at org.infinispan.expiration.impl.ExpirationManagerImpl.processExpiration(ExpirationManagerImpl.java:120)
> at org.infinispan.expiration.impl.ExpirationManagerImpl$ScheduledTask.run(ExpirationManagerImpl.java:282)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:285)
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:467)
> ... 14 more
> {code}
> The method initSelectOnlyExpiredRowsSql in [AbstractTableManager|https://github.com/infinispan/infinispan/blob/master...] includes a FOR UPDATE:
> {code:java}
> return String.format("%1$s WHERE %2$s < ? AND %2$s > 0 FOR UPDATE", getLoadAllRowsSql(), config.timestampColumnName());
> {code}
> It should probably be overwritten in [SQLServerTableManger|https://github.com/infinispan/infinispan/blob/master...] with
> {code:java}
> return String.format("%1$s WITH(UPDLOCK) WHERE %2$s < ? AND %2$s > 0", getLoadAllRowsSql(), config.timestampColumnName());
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months
[JBoss JIRA] (ISPN-10836) Docs Productization: Marshalling
by Donald Naro (Jira)
[ https://issues.redhat.com/browse/ISPN-10836?page=com.atlassian.jira.plugi... ]
Donald Naro updated ISPN-10836:
-------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/infinispan/infinispan/pull/7668, https://github.com/infinispan/infinispan/pull/7814, https://github.com/infinispan/infinispan/pull/7813 (was: https://github.com/infinispan/infinispan/pull/7668)
> Docs Productization: Marshalling
> --------------------------------
>
> Key: ISPN-10836
> URL: https://issues.redhat.com/browse/ISPN-10836
> Project: Infinispan
> Issue Type: Enhancement
> Components: Documentation
> Reporter: Donald Naro
> Assignee: Donald Naro
> Priority: Major
>
> Productize content for marshalling and protostream.
> Modularize existing content.
> Show consistent examples for usage (i.e. should match CLI example).
> Identify additional changes and work to develop customer content.
> Review Server Guide marshalling section (8. Adding Custom Marshaller Bridges) and make sure this is relevant and up to date for DG 8
> From Ryan:
> - protostream and marshalling:
> The important things to document are:
> Jboss marshalling no longer present by default, infinispan-jboss-marshalling jar must be added to the classpath of the client/server if required.
> - Externalizers ignored unless this is present
> Protostream is the default marshaller for user types. Need to document the process of generating marshallers using pojos, and configuring the serialization context.
> - Best practices on how to evolve schemas to ensure backwards-compatibility
> Possible to configure a custom user marshaller in embedded mode, for example if the user wants to use Java Serialization but not jboss marshalling.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months
[JBoss JIRA] (ISPN-11266) Split CacheTopologyControlCommand into individual commands
by Ryan Emerson (Jira)
Ryan Emerson created ISPN-11266:
-----------------------------------
Summary: Split CacheTopologyControlCommand into individual commands
Key: ISPN-11266
URL: https://issues.redhat.com/browse/ISPN-11266
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 10.1.1.Final
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Fix For: 11.0.0.Alpha1
Currently the {{CacheTopologyControlCommand}} uses a Type field and a switch statement to differentiate between various topology actions. This worked well for the old Externalizer approach, however it does not fit well with protobuf messages. Instead, the CacheTopologyControlCommand should be split into individual commands, e.g. a TopologyJoinCommand etc.
This enables the logic of the command types to be separated, making it easier to maintain backwards compatibility in the long term. Each command will use a ProtoStream TypeId in the range of 1000 -> 3999, so the cost of two bytes is the same as the existing class ID plus enum Type that we require with the single CacheTopologyControlCommand.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months