Bug 1218148 - l1-lifespan attribute in distributed cache configuration does not enable l1 cache
Summary: l1-lifespan attribute in distributed cache configuration does not enable l1 c...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Clustering
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: jboss-set
QA Contact: Michal Vinkler
URL:
Whiteboard:
Depends On:
Blocks: 1015189
TreeView+ depends on / blocked
 
Reported: 2015-05-04 09:39 UTC by Dominik Pospisil
Modified: 2019-08-19 12:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:48:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5434 0 Major Resolved ClusteringConfigurationBuilder.l1() javadoc incorrectly states that the l1 method enables l1 2017-07-12 07:48:32 UTC
Red Hat Issue Tracker WFLY-4590 0 Major Resolved l1-lifespan attribute in distributed cache configuration does not enable l1 cache 2017-07-12 07:48:31 UTC

Description Dominik Pospisil 2015-05-04 09:39:22 UTC
Description of problem:
l1-lifespan attribute in distributed cache configuration is not honored. If set to a non-zero value it just sets the underlying cache config parameter, but does not explicitly enable l1 which is by default disabled.

Comment 1 Dominik Pospisil 2015-05-04 12:42:58 UTC
DistributedCacheAdd does:

if (lifespan > 0) {
            builder.clustering().l1().lifespan(lifespan);
}

This seems to be correct as infinispan docs says:
public L1ConfigurationBuilder l1()
This method allows configuration of the L1 cache for distributed caches. When this method is called, it automatically enables L1.

However, contrary to this the l1() method just returns plain instance of L1ConfigurationBuilder created by empty constructor which default (disabled) value.

So it seems to be a bug in infinispan.

Comment 2 Martin Gencur 2015-05-05 08:57:08 UTC
The JavaDoc is still incorrect. The default value was changed as part of https://issues.jboss.org/browse/ISPN-1924 (from enabled to disabled by default). 
In order to enable L1 cache, one has to use l1().enable() and then set the lifespan to a desired value.

Comment 3 Martin Gencur 2015-05-05 09:00:16 UTC
For reference, this bug was also reported for JDG by https://issues.jboss.org/browse/ISPN-3867

Comment 4 Paul Ferraro 2015-05-05 11:49:10 UTC
This should be fixed to work the way it does upstream (in WF8/9)
e.g.
builder.clustering().l1().enabled(lifespan > 0).lifespan(lifespan)

Comment 6 Dominik Pospisil 2015-05-06 08:31:47 UTC
PR sent: https://github.com/jbossas/jboss-eap/pull/2420

Comment 7 Dominik Pospisil 2015-05-06 08:32:30 UTC
Proposing for 6.4.x as it blocks workaround for proposed BZ (1015189).

Comment 8 Mike McCune 2016-03-28 22:30:10 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


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