[JBoss JIRA] (ISPN-4984) JdbcStringBasedStore with MySQL sets up column that uses case-insensitive comparisons for keys
by Randall Hauch (JIRA)
Randall Hauch created ISPN-4984:
-----------------------------------
Summary: JdbcStringBasedStore with MySQL sets up column that uses case-insensitive comparisons for keys
Key: ISPN-4984
URL: https://issues.jboss.org/browse/ISPN-4984
Project: Infinispan
Issue Type: Enhancement
Reporter: Randall Hauch
By default MySQL performs case-insensitive comparisons. This results in a problem when Infinispan entries use Strings that are distinct only in case-sensitive ways, since by default Infinispan's JdbcStringBasedStore (and maybe JdbcBinaryCacheStore) use {{VARCHAR(255)}} for the default {{idColumn}} type.
This can of course be corrected in the Infinispan configuration. Rather than specifying this (which is equivalent to the default):
{code}
<idColumn name="ID_COLUMN" type="VARCHAR(255)"/>
{code}
the following can be specified instead:
{code}
<idColumn name="ID_COLUMN" type="VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci"/>
{code}
This will make MySQL perform case-sensitive comparisons and will work for all string keys.
This enhancement request asks that the Infinispan JDBC-based stores use this by default so that it works automatically for MySQL users.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-4983) Public API for tracking completion of Infinispan work for a given user transaction
by Randall Hauch (JIRA)
[ https://issues.jboss.org/browse/ISPN-4983?page=com.atlassian.jira.plugin.... ]
Randall Hauch updated ISPN-4983:
--------------------------------
Description:
When using Infinispan with user transactions, Infinispan will persist the changes to the cache store using a synchronization on the user transaction. This means the persistence operation begins when the user transaction has committed. However, components using Infinispan will likely want to know when Infinispan's work has completed for a given transaction.
In Infinispan 6, it was possible to do this by registering a transaction listener:
{code}
org.infinispan.Cache cache = ...
javax.transaction.Transaction activeTransaction = ...
org.infinispan.transaction.TransactionTable txnTable = cache.getAdvancedCache().getComponentRegistry().getComponent(TransactionTable.class);
org.infinispan.transaction.xa.GlobalTransaction ispnTxID = txnTable.getLocalTransaction(activeTransaction).getGlobalTransaction();
{code}
We'd then use the {{GlobalTransaction}} in our {{@Listener}}:
{code}
@Listener
class TxnListener {
@TransactionCompleted
public void transactionCompleted( TransactionCompletedEvent event ) {
if ( !event.isOriginLocal() ) return;
GlobalTransaction eventIspnTransaction = event.getGlobalTransaction();
if (eventIspnTransaction == null ||
ispnTxID.getId() != eventIspnTransaction.getId()) return;
if ( !event.isSuccessful() ) {
// do stuff
} else {
// do other stuff
}
}
{code}
However, this is no longer possible in Infinispan 7 since these classes were moved to an "impl" package.
Can we please have a public API to be notified when Infinispan has complete its work for a specific user transaction? It doesn't have to be like it was in 6, but ModeShape needs something (see MODE-2353 for details).
was:
When using Infinispan with user transactions, Infinispan will persist the changes to the cache store using a synchronization on the user transaction. This means the persistence operation begins when the user transaction has committed. However, components using Infinispan will likely want to know when Infinispan's work has completed for a given transaction.
In Infinispan 6, it was possible to do this by registering a transaction listener:
{code}
org.infinispan.Cache cache = ...
javax.transaction.Transaction activeTransaction = ...
org.infinispan.transaction.TransactionTable txnTable = cache.getAdvancedCache().getComponentRegistry().getComponent(TransactionTable.class);
org.infinispan.transaction.xa.GlobalTransaction ispnTxID = txnTable.getLocalTransaction(activeTransaction).getGlobalTransaction();
{code}
We'd then use the {{GlobalTransaction}} in our {{@Listener}}:
{code}
@Listener
class TxnListener {
@TransactionCompleted
public void transactionCompleted( TransactionCompletedEvent event ) {
if ( !event.isOriginLocal ) return;
GlobalTransaction eventIspnTransaction = event.getGlobalTransaction();
if (eventIspnTransaction == null ||
ispnTxID.getId() != eventIspnTransaction.getId()) return;
if ( !event.isSuccessful() ) {
// do stuff
} else {
// do other stuff
}
}
{code}
However, this is no longer possible in Infinispan 7 since these classes were moved to an "impl" package.
Can we please have a public API to be notified when Infinispan has complete its work for a specific user transaction? It doesn't have to be like it was in 6, but ModeShape needs something (see MODE-2353 for details).
> Public API for tracking completion of Infinispan work for a given user transaction
> ----------------------------------------------------------------------------------
>
> Key: ISPN-4983
> URL: https://issues.jboss.org/browse/ISPN-4983
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Randall Hauch
> Labels: modeshape
>
> When using Infinispan with user transactions, Infinispan will persist the changes to the cache store using a synchronization on the user transaction. This means the persistence operation begins when the user transaction has committed. However, components using Infinispan will likely want to know when Infinispan's work has completed for a given transaction.
> In Infinispan 6, it was possible to do this by registering a transaction listener:
> {code}
> org.infinispan.Cache cache = ...
> javax.transaction.Transaction activeTransaction = ...
> org.infinispan.transaction.TransactionTable txnTable = cache.getAdvancedCache().getComponentRegistry().getComponent(TransactionTable.class);
> org.infinispan.transaction.xa.GlobalTransaction ispnTxID = txnTable.getLocalTransaction(activeTransaction).getGlobalTransaction();
> {code}
> We'd then use the {{GlobalTransaction}} in our {{@Listener}}:
> {code}
> @Listener
> class TxnListener {
> @TransactionCompleted
> public void transactionCompleted( TransactionCompletedEvent event ) {
> if ( !event.isOriginLocal() ) return;
> GlobalTransaction eventIspnTransaction = event.getGlobalTransaction();
> if (eventIspnTransaction == null ||
> ispnTxID.getId() != eventIspnTransaction.getId()) return;
> if ( !event.isSuccessful() ) {
> // do stuff
> } else {
> // do other stuff
> }
> }
> {code}
> However, this is no longer possible in Infinispan 7 since these classes were moved to an "impl" package.
> Can we please have a public API to be notified when Infinispan has complete its work for a specific user transaction? It doesn't have to be like it was in 6, but ModeShape needs something (see MODE-2353 for details).
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-4983) Public API for tracking completion of Infinispan work for a given user transaction
by Randall Hauch (JIRA)
Randall Hauch created ISPN-4983:
-----------------------------------
Summary: Public API for tracking completion of Infinispan work for a given user transaction
Key: ISPN-4983
URL: https://issues.jboss.org/browse/ISPN-4983
Project: Infinispan
Issue Type: Feature Request
Reporter: Randall Hauch
When using Infinispan with user transactions, Infinispan will persist the changes to the cache store using a synchronization on the user transaction. This means the persistence operation begins when the user transaction has committed. However, components using Infinispan will likely want to know when Infinispan's work has completed for a given transaction.
In Infinispan 6, it was possible to do this by registering a transaction listener:
{code}
org.infinispan.Cache cache = ...
javax.transaction.Transaction activeTransaction = ...
org.infinispan.transaction.TransactionTable txnTable = cache.getAdvancedCache().getComponentRegistry().getComponent(TransactionTable.class);
org.infinispan.transaction.xa.GlobalTransaction ispnTxID = txnTable.getLocalTransaction(activeTransaction).getGlobalTransaction();
{code}
We'd then use the {{GlobalTransaction}} in our {{@Listener}}:
{code}
@Listener
class TxnListener {
@TransactionCompleted
public void transactionCompleted( TransactionCompletedEvent event ) {
if ( !event.isOriginLocal ) return;
GlobalTransaction eventIspnTransaction = event.getGlobalTransaction();
if (eventIspnTransaction == null ||
ispnTxID.getId() != eventIspnTransaction.getId()) return;
if ( !event.isSuccessful() ) {
// do stuff
} else {
// do other stuff
}
}
{code}
However, this is no longer possible in Infinispan 7 since these classes were moved to an "impl" package.
Can we please have a public API to be notified when Infinispan has complete its work for a specific user transaction? It doesn't have to be like it was in 6, but ModeShape needs something (see MODE-2353 for details).
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-3982) TransactionTable leaks memory when JTS is activated
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-3982?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-3982:
----------------------------------
Assignee: Pedro Ruivo
> TransactionTable leaks memory when JTS is activated
> ---------------------------------------------------
>
> Key: ISPN-3982
> URL: https://issues.jboss.org/browse/ISPN-3982
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 5.2.7.Final
> Reporter: Andrey Smirnov
> Assignee: Pedro Ruivo
> Fix For: 5.2.11.Final
>
> Attachments: 0001-ISPN-3982-fixed.patch.gz
>
>
> JBoss EAP 6.2 uses jbossjts-jacorb as it's JTS implementation. In this component com.arjuna.ats.internal.jta.transaction.jts.TransactionImple class has unstable hashCode behaviour.
> This causes mem-leak in TransactionTable when activating JTS.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-4783) Using new ArrayList<>(resultCache.values())
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-4783?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-4783:
-----------------------------------------------
Sebastian Łaskawiec <slaskawi(a)redhat.com> changed the Status of [bug 1160416|https://bugzilla.redhat.com/show_bug.cgi?id=1160416] from POST to MODIFIED
> Using new ArrayList<>(resultCache.values())
> -------------------------------------------
>
> Key: ISPN-4783
> URL: https://issues.jboss.org/browse/ISPN-4783
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 6.0.2.Final, 7.0.0.CR2
> Reporter: Markus Vogt
> Assignee: William Burns
> Fix For: 7.0.0.Final
>
> Attachments: cacheConfig.xml, ISPN4783_Test.java
>
>
> Hi,
> I am a little bit confused about the behaviour of getting the values from a cache and inserting into an ArrayList.
> I've putted one value into a cache, so that cache.size() is returning 1. If i now use 'new ArrayList<>(resultCache.values())', there will be two items in the list.
> By iterating over the cache, only one iteration will run... Where comes the second item from?
> Regards,
> Markus
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-3982) TransactionTable leaks memory when JTS is activated
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-3982?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-3982:
----------------------------------
Fix Version/s: 5.2.11.Final
(was: 5.2.10.Final)
> TransactionTable leaks memory when JTS is activated
> ---------------------------------------------------
>
> Key: ISPN-3982
> URL: https://issues.jboss.org/browse/ISPN-3982
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 5.2.7.Final
> Reporter: Andrey Smirnov
> Fix For: 5.2.11.Final
>
> Attachments: 0001-ISPN-3982-fixed.patch.gz
>
>
> JBoss EAP 6.2 uses jbossjts-jacorb as it's JTS implementation. In this component com.arjuna.ats.internal.jta.transaction.jts.TransactionImple class has unstable hashCode behaviour.
> This causes mem-leak in TransactionTable when activating JTS.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months
[JBoss JIRA] (ISPN-3982) TransactionTable leaks memory when JTS is activated
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-3982?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-3982:
----------------------------------
Fix Version/s: 5.2.10.Final
(was: 5.2.9.Final)
> TransactionTable leaks memory when JTS is activated
> ---------------------------------------------------
>
> Key: ISPN-3982
> URL: https://issues.jboss.org/browse/ISPN-3982
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 5.2.7.Final
> Reporter: Andrey Smirnov
> Fix For: 5.2.10.Final
>
> Attachments: 0001-ISPN-3982-fixed.patch.gz
>
>
> JBoss EAP 6.2 uses jbossjts-jacorb as it's JTS implementation. In this component com.arjuna.ats.internal.jta.transaction.jts.TransactionImple class has unstable hashCode behaviour.
> This causes mem-leak in TransactionTable when activating JTS.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 5 months