You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Bruce Schuchardt (JIRA)" <ji...@apache.org> on 2018/02/14 22:49:00 UTC

[jira] [Resolved] (GEODE-2827) ClientCacheFactory might ignore a provided PoolFactory

     [ https://issues.apache.org/jira/browse/GEODE-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Schuchardt resolved GEODE-2827.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

commit 525241905050e9a192a1f36fc662735ab8e281d9
Author: Michael "Sarge" Dodge <md...@pivotal.io>
Date:   Wed Feb 14 09:03:03 2018 -0800

    GEODE-4511: Ensure a pool is available for durable client subscription. (#1448)

    * GEODE-4511: Ensure a pool is available for durable client subscription.

    * GEODE-4511: Restrict default pool creation for subscription to clients.


> ClientCacheFactory might ignore a provided PoolFactory
> ------------------------------------------------------
>
>                 Key: GEODE-2827
>                 URL: https://issues.apache.org/jira/browse/GEODE-2827
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Kirk Lund
>            Priority: Major
>             Fix For: 1.5.0
>
>
> I found a weird double assignment of the GemFireCacheImpl variable "poolFactory" that is most likely a bug. This might result in ClientCacheFactory replacing a provided poolFactory with a default poolFactory.
> {noformat}
> private PoolFactory poolFactory;
> {noformat}
> The constructor accepts an argument and sets it to that value:
> {noformat}
> private GemFireCacheImpl(boolean isClient, PoolFactory pf, DistributedSystem system, CacheConfig cacheConfig, boolean asyncEventListeners, TypeRegistry typeRegistry) {
>   this.isClient = isClient;
>   this.poolFactory = pf;
> {noformat}
> But then in "private void initialize()" it blindly sets it to null thus wiping out whatever was passed in:
> {noformat}
> this.poolFactory = null;
> {noformat}
> Later during "private void initializeDeclarativeCache()" it calls "determineDefaultPool()" but only if isClient is true:
> {noformat}
> if (this.poolFactory == null) {
>       Map<String, Pool> pools = PoolManager.getAll();
>       if (pools.isEmpty()) {
>         this.poolFactory = createDefaultPF();
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)