[JBoss JIRA] (ISPN-4159) DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-4159?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-4159:
----------------------------------
Fix Version/s: 7.1.0.CR1
(was: 7.1.0.Beta1)
> DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4159
> URL: https://issues.jboss.org/browse/ISPN-4159
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 6.0.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 7.1.0.CR1
>
>
> DefaultTwoWayKey2StringMapper uses two neat tricks.
> 1. it does not encode all supported types, it only encodes non-Strings. Strings are kept unmodified.
> 2. it uses a special prefix (unicode char 0xfeff) to mark which strings were encoded and which are plain.
> Unfortunately some databases, notably MySql, interpret the endianness mark (0xfeff, 0xfffe), convert to native byte order and then drop it.
> This leaves us with no clue the string is not an actual String but an encoded representation of another type. This misinterpretation leads later to ClassCastExceptions in various places in core and user code.
> Proposed fix: get rid of #1 and #2 optimisations. Encode all objects, including Strings and always use the ?n prefix (where n stands for the original type). Drop the 0xFEFF marker prefix.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (ISPN-4167) DummyBaseTransactionManager doesn't clean up when rollback fails
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-4167?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-4167:
----------------------------------
Fix Version/s: 7.1.0.CR1
(was: 7.1.0.Beta1)
> DummyBaseTransactionManager doesn't clean up when rollback fails
> ----------------------------------------------------------------
>
> Key: ISPN-4167
> URL: https://issues.jboss.org/browse/ISPN-4167
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Fix For: 7.1.0.CR1
>
>
> If the rollback fails, the thread local holding the current transaction is not cleared, and it becomes impossible to start a new transaction on the same thread.
> One way this can happen is when Infinispan registers as a XA transaction, but DummyTransactionManager is not configured to use XA Xids:
> {noformat}
> 12:47:57,169 ERROR (testng-ReplicationExceptionTest:) [DummyTransaction] ISPN000098: Exception while rollback
> java.lang.UnsupportedOperationException
> at org.infinispan.transaction.tm.DummyNoXaXid.getBranchQualifier(DummyNoXaXid.java:30)
> at org.infinispan.transaction.xa.recovery.SerializableXid.<init>(SerializableXid.java:37)
> at org.infinispan.transaction.xa.TransactionXaAdapter.convertXid(TransactionXaAdapter.java:251)
> at org.infinispan.transaction.xa.TransactionXaAdapter.rollback(TransactionXaAdapter.java:122)
> at org.infinispan.transaction.tm.DummyTransaction.runRollback(DummyTransaction.java:281)
> at org.infinispan.transaction.tm.DummyTransaction.rollback(DummyTransaction.java:88)
> at org.infinispan.transaction.tm.DummyBaseTransactionManager.rollback(DummyBaseTransactionManager.java:104)
> at org.infinispan.CacheImpl.tryRollback(CacheImpl.java:1442)
> at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1418)
> at org.infinispan.CacheImpl.putInternal(CacheImpl.java:894)
> at org.infinispan.CacheImpl.put(CacheImpl.java:886)
> at org.infinispan.CacheImpl.put(CacheImpl.java:1461)
> at org.infinispan.CacheImpl.put(CacheImpl.java:225)
> at org.infinispan.tx.synchronisation.ReplicationExceptionTest.testSyncReplTimeout(ReplicationExceptionTest.java:54)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (ISPN-4088) Modify signature of Query/CacheQuery.getResultSize() and related offset/pagination methods to return long
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-4088?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-4088:
----------------------------------
Fix Version/s: 7.1.0.CR1
(was: 7.1.0.Beta1)
> Modify signature of Query/CacheQuery.getResultSize() and related offset/pagination methods to return long
> ---------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4088
> URL: https://issues.jboss.org/browse/ISPN-4088
> Project: Infinispan
> Issue Type: Feature Request
> Components: Embedded Querying, Remote Querying
> Affects Versions: 6.0.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Labels: 64QueryBlockers
> Fix For: 7.1.0.CR1
>
>
> The method exists in both new DSL and the classic query api.
> It should be clarified whether this method and the related pagination methods should use int or long for specifying offsets within the data, also should decide if the total number of results / results per page is a long or an int - and update all involved method signatures to have a unitary treatment of this issue.
> It appears that recent Lucene versions can offer the number of results as long, while older ones offer it as int (should be verified).
> This issue was raised in a github conversation here: https://github.com/infinispan/infinispan/pull/2410
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (ISPN-4176) Forcing a commit via recovery RecoveryAdminOperations may create a duplicate GlobalTransaction
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-4176?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-4176:
----------------------------------
Fix Version/s: 7.1.0.CR1
(was: 7.1.0.Beta1)
> Forcing a commit via recovery RecoveryAdminOperations may create a duplicate GlobalTransaction
> ----------------------------------------------------------------------------------------------
>
> Key: ISPN-4176
> URL: https://issues.jboss.org/browse/ISPN-4176
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Transactions
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Fix For: 7.1.0.CR1
>
>
> {{RecoveryManagerImpl.forceTransactionCompletion()}} modifies the {{GlobalTransaction.address}} of the transaction being committed so that the local node is the originator. But the {{GlobalTransaction.id}} stays the same, we could have two transactions with the same {{GlobalTransaction}} - which shouldn't be possible.
> We can't remove the code that changes the {{GlobalTransaction.address}}, because we use it as the originator in other parts of the code. So the only option is to generate a new id as well.
> But there is another problem: RecoveryAwareTransactionTable.cleanupStaleTransactions() doesn't release the locks acquired by that transaction on the primary node. So forcing a commit with a different GlobalTransaction will not be able to acquire the locks that were held by the original transaction.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months