[JBoss JIRA] (ISPN-12148) Hibernate-cache NullPointerException in CacheMgmtInterceptor
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12148?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12148:
-----------------------------------
Fix Version/s: 12.0.0.Dev02
(was: 12.0.0.Dev01)
> Hibernate-cache NullPointerException in CacheMgmtInterceptor
> ------------------------------------------------------------
>
> Key: ISPN-12148
> URL: https://issues.redhat.com/browse/ISPN-12148
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 11.0.1.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 12.0.0.Dev02
>
>
> There is a mismatch between the {{command.hasAnyFlag(FlagBitSets.SKIP_STATISTICS)}} check in {{CacheMgmtInterceptor}} and the {{Param.StatisticsMode.isSkip(command.getParams())}} check in {{CallInterceptor}}, causing the return value to be {{null}} when {{CacheMgmtInterceptor}} expects a {{StatisticsEnvelope}} instance.
>
> {noformat}
> 17:02:05,601 ERROR (Executor-2:[]) [InvocationContextInterceptor] ISPN000136: Error executing command ReadWriteKeyCommand on Cache 'org.infinispan.test.hibernate.cache.commons.functional.entities.Item', writing keys [7]
> java.lang.NullPointerException: null
> at org.infinispan.interceptors.impl.CacheMgmtInterceptor.lambda$updateStatisticsReadWrite$10(CacheMgmtInterceptor.java:372) ~[classes/:?]
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenApply(BaseAsyncInterceptor.java:86) ~[classes/:?]
> at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStatisticsReadWrite(CacheMgmtInterceptor.java:368) ~[classes/:?]
> at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitReadWriteKeyCommand(CacheMgmtInterceptor.java:396) ~[classes/:?]
> at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:91) ~[classes/:?]
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:59) ~[classes/:?]
> at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53) ~[classes/:?]
> at org.infinispan.interceptors.DDAsyncInterceptor.visitReadWriteKeyCommand(DDAsyncInterceptor.java:200) ~[classes/:?]
> at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:91) ~[classes/:?]
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:128) ~[classes/:?]
> at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:90) ~[classes/:?]
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:61) ~[classes/:?]
> at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53) ~[classes/:?]
> at org.infinispan.interceptors.DDAsyncInterceptor.visitReadWriteKeyCommand(DDAsyncInterceptor.java:200) ~[classes/:?]
> at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:91) ~[classes/:?]
> at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49) ~[classes/:?]
> at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:226) ~[classes/:?]
> at org.infinispan.functional.impl.AbstractFunctionalMap.invokeAsync(AbstractFunctionalMap.java:131) ~[classes/:?]
> at org.infinispan.functional.impl.ReadWriteMapImpl.eval(ReadWriteMapImpl.java:56) ~[classes/:?]
> at org.infinispan.hibernate.cache.commons.access.NonStrictAccessDelegate.putFromLoad(NonStrictAccessDelegate.java:118) ~[classes/:?]
> at org.infinispan.hibernate.cache.v53.impl.ReadOnlyEntityDataAccess.putFromLoad(ReadOnlyEntityDataAccess.java:30) ~[classes/:?]
> at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:254) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:160) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:252) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:215) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:133) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:107) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:188) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4289) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:597) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:565) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:226) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:122) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:93) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1277) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.internal.SessionImpl.immediateLoad(SessionImpl.java:1119) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:178) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:309) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:45) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.hibernate.proxy.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:95) ~[hibernate-core-5.3.17.Final.jar:5.3.17.Final]
> at org.infinispan.test.hibernate.cache.commons.functional.entities.Item$HibernateProxy$vC8GnuyS.getName(Unknown Source) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.functional.AbstractNonInvalidationTest.lambda$removeFlushWait$2(AbstractNonInvalidationTest.java:127) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.util.TxUtil.withResourceLocalTx(TxUtil.java:105) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.util.TxUtil.lambda$withTxSessionApply$5(TxUtil.java:56) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.util.TxUtil.withSessionApply(TxUtil.java:72) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.util.TxUtil.withTxSessionApply(TxUtil.java:56) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.functional.SingleNodeTest.withTxSessionApply(SingleNodeTest.java:43) ~[test-classes/:?]
> at org.infinispan.test.hibernate.cache.commons.functional.AbstractNonInvalidationTest.lambda$removeFlushWait$3(AbstractNonInvalidationTest.java:124) ~[test-classes/:?]
> {noformat}
>
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 8 months
[JBoss JIRA] (ISPN-12102) Validate configuration before storing it
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12102?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12102:
-----------------------------------
Fix Version/s: 12.0.0.Dev02
(was: 12.0.0.Dev01)
> Validate configuration before storing it
> ----------------------------------------
>
> Key: ISPN-12102
> URL: https://issues.redhat.com/browse/ISPN-12102
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.1.Final
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Priority: Major
> Fix For: 12.0.0.Dev02
>
>
> Although {{ConfigurationBuilder}} does some validation, sometimes it needs something more. As an example, the cross-site replication needs a running {{Transport}} to check if xsite is really supported.
> As a side effect, the console is broken when you try to define the following cache without {{RELAY2}} being present in the JGroups stack.
> {code:xml}
> <infinispan>
> <cache-container>
> <distributed-cache name="xsite">
> <backups>
> <backup site="site2"/>
> </backups>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> This happens because the {{Configuration}} is stored and the {{Cache}} with the exception is stored as well.
> The fix proposed it adds a method to {{ModuleLifecyle}} where the {{Configuration}} can be validated before it is store in the "global state".
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 8 months
[JBoss JIRA] (ISPN-11802) Create SPI for Cross-Site Replication conflict resolution
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-11802?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-11802:
-----------------------------------
Fix Version/s: 12.0.0.Dev02
(was: 12.0.0.Dev01)
> Create SPI for Cross-Site Replication conflict resolution
> ---------------------------------------------------------
>
> Key: ISPN-11802
> URL: https://issues.redhat.com/browse/ISPN-11802
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core, Cross-Site Replication
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Priority: Major
> Fix For: 12.0.0.Dev02
>
>
> A conflict happens if 2 sites try to update the same key (put/remove) concurrently.
> With async Cross-Site Replication (aka IRAC) when a conflict is detected, we use the site name to pick the winning update.
> h2. Interface
> {code:java}
> interface ABC<V> { // or concrete class
> String site(); //the site name which wrote this value
> V value(); // the value. can be null if the key was removed
> Metadata metadata(); //can be null
> }
> interface Resolve<K, V> {
> ABC<V> resolve(K key, ABC<V> entry1, ABC<V> entry2);
> }
> {code}
> h2. Configuration
> Set the class name to use. Can be a {{Class}} object (as shown above) or a {{String}} with the class name.
> For server mode, you need to add your jar with the classes required to {{server/lib}}.
> The configuration fails to validate if the conflict resolution class is set with {{SYNC}} strategy.
> {code:java}
> ConfigurationBuilder.sites().addBackup()
> .site("S")
> .strategy(BackupConfiguration.BackupStrategy.ASYNC)
> .conflictResolution(MyResover.class);
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 8 months
[JBoss JIRA] (ISPN-7166) WriteSkewConsistencyTest.testValidationOnlyInPrimaryOwner[DIST_SYNC] random failures
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-7166?page=com.atlassian.jira.plugin... ]
Tristan Tarrant updated ISPN-7166:
----------------------------------
Fix Version/s: 12.0.0.Dev02
(was: 12.0.0.Dev01)
> WriteSkewConsistencyTest.testValidationOnlyInPrimaryOwner[DIST_SYNC] random failures
> ------------------------------------------------------------------------------------
>
> Key: ISPN-7166
> URL: https://issues.redhat.com/browse/ISPN-7166
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite
> Affects Versions: 9.0.0.Alpha4
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Labels: testsuite_stability
> Fix For: 11.0.2.Final, 12.0.0.Dev02
>
>
> The test requires a key to have a specific primary owner and backup owner, but because is uses the default {{SynchronizedConsistentHashFactory}}, sometimes there's no segment meeting that requirement.
> {noformat}
> 16:52:02,516 ERROR (testng-WriteSkewConsistencyTest[DIST_SYNC]:[]) [TestSuiteProgress] Test failed: org.infinispan.container.versioning.WriteSkewConsistencyTest.testValidationOnlyInPrimaryOwner[DIST_SYNC]
> java.lang.IllegalStateException: Could not find any segment owned by Cache '___defaultcache'@WriteSkewConsistencyTest[DIST_SYNC]-NodeB-47455, [Cache '___defaultcache'@WriteSkewConsistencyTest[DIST_SYNC]-NodeA-21455], primary segments: [33, 2, 3, 5, 37, 6, 41, 10, 45, 15, 48, 18, 50, 25, 59, 29], backup segments: {Cache '___defaultcache'@WriteSkewConsistencyTest[DIST_SYNC]-NodeA-21455=[35, 8, 40, 12, 14, 52, 21, 53, 22, 24, 57, 58, 27, 31]}
> at org.infinispan.distribution.MagicKey.<init>(MagicKey.java:85) ~[test-classes/:?]
> at org.infinispan.distribution.MagicKey.<init>(MagicKey.java:136) ~[test-classes/:?]
> at org.infinispan.container.versioning.WriteSkewConsistencyTest.testValidationOnlyInPrimaryOwner(WriteSkewConsistencyTest.java:58) ~[test-classes/:?]
> {noformat}
> The test should either use a fixed key and accept random owners, or use a {{ControlledConsistentHashFactory}} to pin the owners.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 8 months
[JBoss JIRA] (ISPN-12151) Add error count metric
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12151?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12151:
-----------------------------------
Fix Version/s: 12.0.0.Dev02
(was: 12.0.0.Dev01)
> Add error count metric
> ----------------------
>
> Key: ISPN-12151
> URL: https://issues.redhat.com/browse/ISPN-12151
> Project: Infinispan
> Issue Type: Feature Request
> Components: Analytics
> Affects Versions: 11.0.1.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 12.0.0.Final, 12.0.0.Dev02
>
>
> {{CacheMgmtInterceptor}} has metrics for the different kind of key operations, but errors are not tracked. We should add a metric to count errors, and perhaps a histogram for the duration of failed invocations as well.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 8 months