[JBoss JIRA] (ISPN-9677) Non-transactional queries don't update the query cache
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/ISPN-9677?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-9677:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/6374
> Non-transactional queries don't update the query cache
> ------------------------------------------------------
>
> Key: ISPN-9677
> URL: https://issues.jboss.org/browse/ISPN-9677
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 9.4.1.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
> Fix For: 9.4.2.Final
>
>
> This is affecting the Hibernate second-level cache simple tutorials where queries are executed outside transactions.
> The problem is that the new integration for the query results (result of ISPN-9075) does not verify if there's an on-going transaction before registering a transaction completed synchronization where the query cache is updated.
> As a result, when a non-transactional query happens, the transaction synchronization callback does not happen and the query cache is not updated.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9677) Non-transactional queries don't update the query cache
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/ISPN-9677?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-9677:
-----------------------------------
Status: Open (was: New)
> Non-transactional queries don't update the query cache
> ------------------------------------------------------
>
> Key: ISPN-9677
> URL: https://issues.jboss.org/browse/ISPN-9677
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 9.4.1.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
> Fix For: 9.4.2.Final
>
>
> This is affecting the Hibernate second-level cache simple tutorials where queries are executed outside transactions.
> The problem is that the new integration for the query results (result of ISPN-9075) does not verify if there's an on-going transaction before registering a transaction completed synchronization where the query cache is updated.
> As a result, when a non-transactional query happens, the transaction synchronization callback does not happen and the query cache is not updated.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9675) Hibernate local simple tutorial query hit assertion error
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/ISPN-9675?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño resolved ISPN-9675.
------------------------------------
Fix Version/s: 9.4.2.Final
Resolution: Duplicate Issue
Duplicates ISPN-9677
> Hibernate local simple tutorial query hit assertion error
> ---------------------------------------------------------
>
> Key: ISPN-9675
> URL: https://issues.jboss.org/browse/ISPN-9675
> Project: Infinispan
> Issue Type: Bug
> Components: Demos and Tutorials
> Affects Versions: 9.4.0.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
> Fix For: 9.4.2.Final
>
>
> {code}
> [INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ infinispan-simple-tutorials-hibernate-cache-local ---
> ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
> Event entity cache puts: 3 (expected 3)
> Found entity: Event{id=1, name='Caught a pokemon!', time=2018-11-05T14:03:23.155}
> Event entity cache hits: 1 (expected 1)
> Updated entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
> Event entity cache hits: 1 (expected 1)
> Event entity cache puts: 1 (expected 1)
> Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
> Event entity cache hits: 1 (expected 1)
> Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
> Event entity cache miss: 1 (expected 1)
> Event entity cache puts: 1 (expected 1)
> Event entity cache hits: 1 (expected 1)
> Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
> Query cache miss: 1 (expected 1)
> Query cache put: 1 (expected 1)
> Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
> Event entity cache hits: 0 (expected 2)
> Exception in thread "main" java.lang.AssertionError: Expected: 2, actual: 0
> at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.printfAssert(InfinispanHibernateCacheLocal.java:263)
> at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.main(InfinispanHibernateCacheLocal.java:95)
> [ERROR] Command execution failed.
> org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
> at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
> at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
> at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9677) Non-transactional queries don't update the query cache
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/ISPN-9677?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-9677:
----------------------------------------
Hibernate local simple tutorial output:
{code}
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ infinispan-simple-tutorials-hibernate-cache-local ---
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Event entity cache puts: 3 (expected 3)
Found entity: Event{id=1, name='Caught a pokemon!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Updated entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache miss: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Event entity cache hits: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Query cache miss: 1 (expected 1)
Query cache put: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Event entity cache hits: 0 (expected 2)
Exception in thread "main" java.lang.AssertionError: Expected: 2, actual: 0
at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.printfAssert(InfinispanHibernateCacheLocal.java:263)
at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.main(InfinispanHibernateCacheLocal.java:95)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
{code}
> Non-transactional queries don't update the query cache
> ------------------------------------------------------
>
> Key: ISPN-9677
> URL: https://issues.jboss.org/browse/ISPN-9677
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 9.4.1.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
> Fix For: 9.4.2.Final
>
>
> This is affecting the Hibernate second-level cache simple tutorials where queries are executed outside transactions.
> The problem is that the new integration for the query results (result of ISPN-9075) does not verify if there's an on-going transaction before registering a transaction completed synchronization where the query cache is updated.
> As a result, when a non-transactional query happens, the transaction synchronization callback does not happen and the query cache is not updated.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9677) Non-transactional queries don't update the query cache
by Galder Zamarreño (Jira)
Galder Zamarreño created ISPN-9677:
--------------------------------------
Summary: Non-transactional queries don't update the query cache
Key: ISPN-9677
URL: https://issues.jboss.org/browse/ISPN-9677
Project: Infinispan
Issue Type: Bug
Components: Hibernate Cache
Affects Versions: 9.4.1.Final
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 9.4.2.Final
This is affecting the Hibernate second-level cache simple tutorials where queries are executed outside transactions.
The problem is that the new integration for the query results (result of ISPN-9075) does not verify if there's an on-going transaction before registering a transaction completed synchronization where the query cache is updated.
As a result, when a non-transactional query happens, the transaction synchronization callback does not happen and the query cache is not updated.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9675) Hibernate local simple tutorial query hit assertion error
by Galder Zamarreño (Jira)
Galder Zamarreño created ISPN-9675:
--------------------------------------
Summary: Hibernate local simple tutorial query hit assertion error
Key: ISPN-9675
URL: https://issues.jboss.org/browse/ISPN-9675
Project: Infinispan
Issue Type: Bug
Components: Demos and Tutorials
Affects Versions: 9.4.0.Final
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
{code}
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ infinispan-simple-tutorials-hibernate-cache-local ---
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Event entity cache puts: 3 (expected 3)
Found entity: Event{id=1, name='Caught a pokemon!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Updated entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache hits: 1 (expected 1)
Found entity: Event{id=1, name='Caught a Snorlax!!', time=2018-11-05T14:03:23.155}
Event entity cache miss: 1 (expected 1)
Event entity cache puts: 1 (expected 1)
Event entity cache hits: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Query cache miss: 1 (expected 1)
Query cache put: 1 (expected 1)
Queried events: [Event{id=2, name='Hatched an egg', time=2018-11-05T14:03:23.168}, Event{id=3, name='Became a gym leader', time=2018-11-05T14:03:23.169}]
Event entity cache hits: 0 (expected 2)
Exception in thread "main" java.lang.AssertionError: Expected: 2, actual: 0
at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.printfAssert(InfinispanHibernateCacheLocal.java:263)
at org.infinispan.tutorial.simple.hibernate.cache.local.InfinispanHibernateCacheLocal.main(InfinispanHibernateCacheLocal.java:95)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9596) Hibernate Spring simple tutorial should use Hibernate 5.2 compatible provider
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/ISPN-9596?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño resolved ISPN-9596.
------------------------------------
Resolution: Done
> Hibernate Spring simple tutorial should use Hibernate 5.2 compatible provider
> -----------------------------------------------------------------------------
>
> Key: ISPN-9596
> URL: https://issues.jboss.org/browse/ISPN-9596
> Project: Infinispan
> Issue Type: Bug
> Components: Demos and Tutorials
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
>
> It currently uses Hibernate 5.1 provider which causes an {{AbstractMethodError}}:
> {code}
> java.lang.AbstractMethodError:
> Method org/infinispan/hibernate/cache/v51/timestamp/TimestampsRegionImpl.put(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;Ljava/lang/Object;Ljava/lang/Object;)V is abstract
> at org.infinispan.hibernate.cache.v51.timestamp.TimestampsRegionImpl.put(TimestampsRegionImpl.java) ~[infinispan-hibernate-cache-v51-9.2.5.Final.jar:9.2.5.Final]
> at org.hibernate.cache.spi.UpdateTimestampsCache.preInvalidate(UpdateTimestampsCache.java:77) ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month