[JBoss JIRA] (ISPN-9173) Availability mode should be updated atomically with the actual members
by Dan Berindei (JIRA)
Dan Berindei created ISPN-9173:
----------------------------------
Summary: Availability mode should be updated atomically with the actual members
Key: ISPN-9173
URL: https://issues.jboss.org/browse/ISPN-9173
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.3.0.Beta1
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 9.3.0.CR1
This is a follow-up on ISPN-7682, which asks for the topology itself to be updated atomically.
{{LocalTopologyManagerImpl}} has additional logic to update the availability mode first when the cache becomes degraded and to update it last when the cache becomes available, which means any delay between the updates cannot cause data inconsistencies.
But that logic doesn't really belong in {{LocalTopologyManagerImpl}}, and it's easy to forget it's there (and in fact we had a bug there related to the new rebalance phases).
In addition, tests that want to check the cache behaviour in degraded mode and wait only for the availability mode change will fail if there's a big delay between the availability mode change. I actually hit this while testing my ISPN-8731/ISPN-7682 changes, and I had added a random delay in {{StateConsumerImpl}} before {{distributionManager.setCacheTopology()}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (ISPN-9163) RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/ISPN-9163?page=com.atlassian.jira.plugin.... ]
Radoslav Husar reassigned ISPN-9163:
------------------------------------
Assignee: Radoslav Husar
> RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-9163
> URL: https://issues.jboss.org/browse/ISPN-9163
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod
> Affects Versions: 9.2.3.Final, 9.3.0.Beta1
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
>
> {{RemoteCacheManagerAdmin#getOrCreateCache(...)}} fails to return an existing cache in case the template does not exist. This is because {{org.infinispan.globalstate.impl.GlobalConfigurationManagerImpl#getOrCreateCache}} first obtains the cache configuration and only then gets the cache.
> While it could be argued, that this is by design, this does not seem practical but mainly violates the API contract defined by JavaDoc:
> {code:java}
> /**
> * Retrieves a an existing cache on the remote server cluster. If it doesn't exist, it will be created using the
> * specified template.
> *
> * @param name the name of the cache to create
> * @param template the template to use for the cache. If null, the configuration marked as default on the server
> * will be used
> * @return the cache
> * @throws HotRodClientException
> */
> @Override
> <K, V> RemoteCache<K, V> getOrCreateCache(String name, String template) throws HotRodClientException;
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (ISPN-9163) RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/ISPN-9163?page=com.atlassian.jira.plugin.... ]
Radoslav Husar updated ISPN-9163:
---------------------------------
Status: Open (was: New)
> RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-9163
> URL: https://issues.jboss.org/browse/ISPN-9163
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod
> Affects Versions: 9.2.3.Final, 9.3.0.Beta1
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
>
> {{RemoteCacheManagerAdmin#getOrCreateCache(...)}} fails to return an existing cache in case the template does not exist. This is because {{org.infinispan.globalstate.impl.GlobalConfigurationManagerImpl#getOrCreateCache}} first obtains the cache configuration and only then gets the cache.
> While it could be argued, that this is by design, this does not seem practical but mainly violates the API contract defined by JavaDoc:
> {code:java}
> /**
> * Retrieves a an existing cache on the remote server cluster. If it doesn't exist, it will be created using the
> * specified template.
> *
> * @param name the name of the cache to create
> * @param template the template to use for the cache. If null, the configuration marked as default on the server
> * will be used
> * @return the cache
> * @throws HotRodClientException
> */
> @Override
> <K, V> RemoteCache<K, V> getOrCreateCache(String name, String template) throws HotRodClientException;
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (ISPN-9163) RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/ISPN-9163?page=com.atlassian.jira.plugin.... ]
Work on ISPN-9163 started by Radoslav Husar.
--------------------------------------------
> RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-9163
> URL: https://issues.jboss.org/browse/ISPN-9163
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod
> Affects Versions: 9.2.3.Final, 9.3.0.Beta1
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
>
> {{RemoteCacheManagerAdmin#getOrCreateCache(...)}} fails to return an existing cache in case the template does not exist. This is because {{org.infinispan.globalstate.impl.GlobalConfigurationManagerImpl#getOrCreateCache}} first obtains the cache configuration and only then gets the cache.
> While it could be argued, that this is by design, this does not seem practical but mainly violates the API contract defined by JavaDoc:
> {code:java}
> /**
> * Retrieves a an existing cache on the remote server cluster. If it doesn't exist, it will be created using the
> * specified template.
> *
> * @param name the name of the cache to create
> * @param template the template to use for the cache. If null, the configuration marked as default on the server
> * will be used
> * @return the cache
> * @throws HotRodClientException
> */
> @Override
> <K, V> RemoteCache<K, V> getOrCreateCache(String name, String template) throws HotRodClientException;
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (ISPN-9166) RemoteCacheManagerAdmin#getOrCreateCache(...) fails when creating transactional caches
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/ISPN-9166?page=com.atlassian.jira.plugin.... ]
Radoslav Husar updated ISPN-9166:
---------------------------------
Priority: Critical (was: Major)
> RemoteCacheManagerAdmin#getOrCreateCache(...) fails when creating transactional caches
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9166
> URL: https://issues.jboss.org/browse/ISPN-9166
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, Server
> Affects Versions: 9.2.3.Final
> Reporter: Radoslav Husar
> Priority: Critical
>
> When using a template with transactions configured, e.g.
> {code:xml}
> <distributed-cache-configuration name="offloaded-sessions">
> <transaction mode="NON_DURABLE_XA" locking="PESSIMISTIC"/>
> </distributed-cache-configuration>
> {code}
> creation fails with
> {noformat}
> [JBossINF] [0m[31m05:05:59,066 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (remote-thread--p2-t7) ISPN000136: Error executing command PutKeyValueCommand, writing keys [ClusterConfigurationScope{scope='cache', name='clusterbench-ee7.ear.clusterbench-ee7-web-granular.war'}]: org.infinispan.commons.CacheListenerException: ISPN000280: Caught exception [org.infinispan.commons.CacheConfigurationException] while invoking method [public void org.infinispan.globalstate.impl.GlobalConfigurationStateListener.createCache(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent)] on listener instance: org.infinispan.globalstate.impl.GlobalConfigurationStateListener@417b6e5f
> [JBossINF] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:401)
> [JBossINF] at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20)
> [JBossINF] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.invoke(AbstractListenerImpl.java:419)
> [JBossINF] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1565)
> [JBossINF] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1561)
> [JBossINF] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invokeNoChecks(CacheNotifierImpl.java:1556)
> [JBossINF] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invoke(CacheNotifierImpl.java:1535)
> [JBossINF] at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:368)
> [JBossINF] at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.notifyCommitEntry(ClusteringDependentLogic.java:261)
> [JBossINF] at org.infinispan.interceptors.locking.ClusteringDependentLogic$ReplicationLogic.commitSingleEntry(ClusteringDependentLogic.java:493)
> [JBossINF] at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:186)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:578)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:746)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:555)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyChanges(EntryWrappingInterceptor.java:611)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.lambda$setSkipRemoteGetsAndInvokeNextForDataCommand$8(EntryWrappingInterceptor.java:667)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:108)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:664)
> [JBossINF] at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:304)
> [JBossINF] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:79)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)
> [JBossINF] at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:107)
> [JBossINF] at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:39)
> [JBossINF] at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)
> [JBossINF] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:79)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)
> [JBossINF] at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:330)
> [JBossINF] at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:268)
> [JBossINF] at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:118)
> [JBossINF] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:79)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)
> [JBossINF] at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:171)
> [JBossINF] at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)
> [JBossINF] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:79)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:126)
> [JBossINF] at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:92)
> [JBossINF] at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:59)
> [JBossINF] at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53)
> [JBossINF] at org.infinispan.interceptors.DDAsyncInterceptor.visitPutKeyValueCommand(DDAsyncInterceptor.java:59)
> [JBossINF] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:79)
> [JBossINF] at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
> [JBossINF] at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:267)
> [JBossINF] at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommandAsync(BaseRpcInvokingCommand.java:71)
> [JBossINF] at org.infinispan.commands.remote.SingleRpcCommand.invokeAsync(SingleRpcCommand.java:58)
> [JBossINF] at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokeCommand(BasePerCacheInboundInvocationHandler.java:95)
> [JBossINF] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.invoke(BaseBlockingRunnable.java:91)
> [JBossINF] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.runAsync(BaseBlockingRunnable.java:69)
> [JBossINF] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:41)
> [JBossINF] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [JBossINF] at java.lang.Thread.run(Thread.java:748)
> [JBossINF] Caused by: org.infinispan.commons.CacheConfigurationException: Unable to instantiate class org.jboss.as.clustering.infinispan.TransactionManagerProvider
> [JBossINF] at org.infinispan.commons.util.Util.getInstance(Util.java:246)
> [JBossINF] at org.infinispan.commons.util.Util.getInstance(Util.java:289)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.parseTransaction(Parser.java:1907)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.parseCacheElement(Parser.java:1527)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.parseSharedStateCacheElement(Parser.java:1298)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.parseDistributedCache(Parser.java:2230)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.parseContainer(Parser.java:613)
> [JBossINF] at org.infinispan.configuration.parsing.Parser.readElement(Parser.java:134)
> [JBossINF] at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:170)
> [JBossINF] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:149)
> [JBossINF] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:136)
> [JBossINF] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:122)
> [JBossINF] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:116)
> [JBossINF] at org.infinispan.globalstate.impl.GlobalConfigurationManagerImpl.createCacheLocally(GlobalConfigurationManagerImpl.java:157)
> [JBossINF] at org.infinispan.globalstate.impl.GlobalConfigurationStateListener.createCache(GlobalConfigurationStateListener.java:28)
> [JBossINF] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [JBossINF] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [JBossINF] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [JBossINF] at java.lang.reflect.Method.invoke(Method.java:498)
> [JBossINF] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:396)
> [JBossINF] ... 50 more
> [JBossINF] Caused by: java.lang.InstantiationException: org.jboss.as.clustering.infinispan.TransactionManagerProvider
> [JBossINF] at java.lang.Class.newInstance(Class.java:427)
> [JBossINF] at org.infinispan.commons.util.Util.getInstanceStrict(Util.java:271)
> [JBossINF] at org.infinispan.commons.util.Util.getInstance(Util.java:244)
> [JBossINF] ... 69 more
> [JBossINF] Caused by: java.lang.NoSuchMethodException: org.jboss.as.clustering.infinispan.TransactionManagerProvider.<init>()
> [JBossINF] at java.lang.Class.getConstructor0(Class.java:3082)
> [JBossINF] at java.lang.Class.newInstance(Class.java:412)
> [JBossINF] ... 71 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months