[infinispan-issues] [JBoss JIRA] (ISPN-9163) RemoteCacheManagerAdmin#getOrCreateCache(...) fails to return an existing cache in case the template does not exist

Radoslav Husar (JIRA) issues at jboss.org
Thu May 17 10:12:00 EDT 2018


     [ https://issues.jboss.org/browse/ISPN-9163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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)


More information about the infinispan-issues mailing list