[JBoss JIRA] (ISPN-4159) DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4159?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4159:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> 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.Alpha1
>
>
> 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.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4175) Initialisation of remote query module fails randomly due to ClusterRegistry not bein initialised
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4175?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4175:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> Initialisation of remote query module fails randomly due to ClusterRegistry not bein initialised
> ------------------------------------------------------------------------------------------------
>
> Key: ISPN-4175
> URL: https://issues.jboss.org/browse/ISPN-4175
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Querying
> Affects Versions: 6.0.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Labels: 64QueryBlockers
> Fix For: 7.1.0.Alpha1
>
>
> {code}
> 11:47:01,852 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.infinispan.clustered.memcachedCache: org.jboss.msc.service.StartException in service jboss.infinispan.clustered.memcachedCache: Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
> at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
> Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheConfigurationException: No registered default factory for component 'interface org.infinispan.registry.ClusterRegistry' found!. To get more detail set the system property infinispan.debugDependencies to true
> at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:241)
> at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:546)
> at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:517)
> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:399)
> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:413)
> at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:89)
> at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:80)
> at org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
> ... 3 more
> Caused by: org.infinispan.commons.CacheConfigurationException: No registered default factory for component 'interface org.infinispan.registry.ClusterRegistry' found!. To get more detail set the system property infinispan.debugDependencies to true
> at org.infinispan.factories.AbstractComponentRegistry.throwStackAwareConfigurationException(AbstractComponentRegistry.java:884)
> at org.infinispan.factories.AbstractComponentRegistry.getFactory(AbstractComponentRegistry.java:299)
> at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:270)
> at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
> at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
> at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:148)
> at org.infinispan.query.remote.LifecycleManager.initProtobufMetadataManager(LifecycleManager.java:56)
> at org.infinispan.query.remote.LifecycleManager.cacheManagerStarted(LifecycleManager.java:70)
> at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:228)
> ... 12 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4167) DummyBaseTransactionManager doesn't clean up when rollback fails
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4167?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4167:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> 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.Alpha1
>
>
> 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.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4176) Forcing a commit via recovery RecoveryAdminOperations may create a duplicate GlobalTransaction
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4176?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4176:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> 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.Alpha1
>
>
> {{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.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4190) Use Message.Flag.DONT_LOOPBACK instead of RequestOptions.setExclusionList
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4190?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4190:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> Use Message.Flag.DONT_LOOPBACK instead of RequestOptions.setExclusionList
> -------------------------------------------------------------------------
>
> Key: ISPN-4190
> URL: https://issues.jboss.org/browse/ISPN-4190
> Project: Infinispan
> Issue Type: Task
> Components: Core
> Affects Versions: 7.0.0.Alpha2
> Reporter: Dan Berindei
> Fix For: 7.1.0.Alpha1
>
>
> We are currently using {{RequestOptions.setExclusionList(channel.getAddress())}} in CommandAwareRpcDispatcher, to prevent the sender of an RPC to receive that message. We can't use {{Channel.setDiscardOwnMessages(true)}}, because TO requires messages to be delivered to self.
> JGroups 3.5.0.Beta2 has added a {{DONT_LOOPBACK}} flag, which should be a lot more efficient than using the exclusion list. We should start using it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4262) Rolling back a transaction after commit timeout should release locks in two phases
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4262?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4262:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> Rolling back a transaction after commit timeout should release locks in two phases
> ----------------------------------------------------------------------------------
>
> Key: ISPN-4262
> URL: https://issues.jboss.org/browse/ISPN-4262
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Transactions
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Fix For: 7.1.0.Alpha1
>
>
> This is related to ISPN-4137.
> When a commit command times out, we send a rollback command to release locks. The problem is that the node that timed out might still execute commit command, before the rollback command reaching the backup but after it released the locks on the primary owner.
> The solution is to not release any locks during the rollback command's execution, but send an asynchronous TxCompletionNotification afterwards - just like for commit commands.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (ISPN-4286) Two concurrent putIfAbsent operations can both return null during rebalance
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4286?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-4286:
-----------------------------------
Fix Version/s: 7.1.0.Alpha1
(was: 7.0.0.Final)
> Two concurrent putIfAbsent operations can both return null during rebalance
> ---------------------------------------------------------------------------
>
> Key: ISPN-4286
> URL: https://issues.jboss.org/browse/ISPN-4286
> Project: Infinispan
> Issue Type: Bug
> Components: Core, State Transfer
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Fix For: 7.1.0.Alpha1
>
>
> If the cache topology changes while executing a putIfAbsent operation, the old primary owner will throw an OutdatedTopologyException, and the originator will retry on the new owner.
> When retrying the PutKeyValueCommand on the new primary owner, we compare the current value with the command's new value. If they are equal, we assume that the initial command wrote the old value, and we return {{null}}.
> However, the value might have been written by another putIfAbsent operation. So we could have two {{putIfAbsent(k, v)}} operations, both returning {{null}}.
> {code}
> A is the originator, B is the primary owner, k = null
> A -> B: putIfAbsent(k, v1)
> B dies before writing v, C is now primary owner
> D -> C: putIfAbsent(k, v1) // another put operation from D, with the same value
> C -> D: null // correct
> A -> C: retry_putIfAbsent(k, v1)
> C -> A: null // C assumes A is overwriting its own value, so it's also returning null
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month