ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-1094) Ignite.createCache(CacheConfiguration) hangs if some exception occurs during cache initialization
Date Wed, 19 Jul 2017 16:14:01 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093336#comment-16093336
] 

Alexey Kuznetsov commented on IGNITE-1094:
------------------------------------------

[~yzhdanov] Consider org.apache.ignite.internal.processors.cache.GridCacheProcessor#createCache()
method, which creates cache store as follows(algorithm 1 step):
{code:java}
cfgStore = cfg.getCacheStoreFactory() != null ? cfg.getCacheStoreFactory().create() : null;
{code}
when exception arises in store creation, we can check a flag(indicating creation failed) and
continue cache creation as if creation succeedes (pseudocode) :
{code:java}
        try {
            cfgStore = cfg.getCacheStoreFactory() != null ? cfg.getCacheStoreFactory().create()
: null;
        }
        catch (Throwable e) {
            desc.cacheStoreCreationFailed(true);
        }
{code}
Then in some place we can test this flag whether creation failed or not, and continue algorithm
2 step. Do you think its an appropriate scheme?


> Ignite.createCache(CacheConfiguration) hangs if some exception occurs during cache initialization
> -------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-1094
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1094
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Sergey Evdokimov
>            Assignee: Alexey Kuznetsov
>              Labels: Muted_test
>             Fix For: 2.2
>
>
> User can pass broken configuration, for example, store factory that throws exception
from create() method. I created test to demonstrate the problem. See IgniteDynamicCacheStartSelfTest#testBrokenStoreFactory
in 'ignite-1094' branch 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message