Bug 799236 - JDG is forced to use L1 caching for distributed mode
Summary: JDG is forced to use L1 caching for distributed mode
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: unspecified
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 6.0.0
Assignee: Tristan Tarrant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-02 08:20 UTC by Martin Gencur
Modified: 2025-02-10 03:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:19:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-1919 0 Major Resolved L1ConfigurationBuilder should disable onRehash when disabling L1 2018-08-07 01:52:59 UTC

Description Martin Gencur 2012-03-02 08:20:03 UTC
Description of problem:

When users don't want to use L1 caching, they have to set l1-lifespan to 0:
<distributed-cache 
    name="default" 
    start="EAGER"
    ...
    l1-lifespan="0" 
    ...

However, this settings causes an exception to be thrown in ER2:

08:46:12,959 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 24) JBAS014612: Operation ("add") failed - address: ([
    ("subsystem" => "infinispan"),
    ("cache-container" => "default"),
    ("distributed-cache" => "default")
]): org.infinispan.config.ConfigurationException: Can only move entries to L1 on rehash when L1 is enabled
	at org.infinispan.configuration.cache.L1ConfigurationBuilder.validate(L1ConfigurationBuilder.java:116)
	at org.infinispan.configuration.cache.ClusteringConfigurationBuilder.validate(ClusteringConfigurationBuilder.java:90)
	at org.infinispan.configuration.cache.ConfigurationBuilder.validate(ConfigurationBuilder.java:132)
	at org.infinispan.configuration.cache.ConfigurationBuilder.build(ConfigurationBuilder.java:140)
	at org.jboss.as.clustering.infinispan.subsystem.CacheAdd.performRuntime(CacheAdd.java:193)
	at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50) [jboss-as-controller-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]
	at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:311) [jboss-as-controller-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_21]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_21]
	at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA-redhat-1.jar:2.0.0.GA-redhat-1]


This can be fixed in ISPN subsystem of AS7 by adding .disableOnRehash() at https://github.com/jbossas/jboss-as/blob/master/clustering/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/DistributedCacheAdd.java#L68

Nevertheless, I'm for a change in Infinispan itself. One would suppose that when they set .l1().disable(), the l1 caching will be really disabled. Users are, though, forced to set it like this: .l1().disable().disableOnRehash(). Otherwise they get the exception above.  

We should create a JIRA based on the decision where the fix should be - either in ISPN or AS7.

Comment 1 Martin Gencur 2012-03-02 08:22:52 UTC
When I set l1-lifespan to anything higher than 0, it works. But then the L1 caching is enabled.

Comment 2 Martin Gencur 2012-03-16 08:51:52 UTC
Verified with ER4.

Comment 4 Red Hat Bugzilla 2025-02-10 03:19:11 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.