You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Dmitry Karachentsev <dk...@gridgain.com> on 2018/02/01 15:36:30 UTC
LOCAL cache on client
Hello everyone!
We have an erroneous use case when client tries to create LOCAL cache,
but by default it does not initiates default data region. So client gets
NPE. [1]
I think it should be a lazy data region initialization on client. Do you
have any concerns about this approach or other proposals?
[1] https://issues.apache.org/jira/browse/IGNITE-7572
Thanks!
Re: LOCAL cache on client
Posted by Valentin Kulichenko <va...@gmail.com>.
Dmitry,
I don't think we need to show warnings until there is an attempt to create
a local cache. This is a very rare use case, not worth it. We should
properly document it though.
-Val
On Fri, Feb 2, 2018 at 12:18 AM, Dmitry Karachentsev <
dkarachentsev@gridgain.com> wrote:
> Sounds pretty reasonable for me, so fix will entail just in proper
> exception.
> Maybe it worth to show warning that says that's no data region configured
> and it's not possible to create LOCAL cache?
>
> Thanks!
>
> 02.02.2018 00:08, Valentin Kulichenko пишет:
>
> I meant "they should *explicitly* provide data region configuration", of
>> course.
>>
>> -Val
>>
>> On Thu, Feb 1, 2018 at 10:58 AM, Valentin Kulichenko <
>> valentin.kulichenko@gmail.com> wrote:
>>
>> Agree with Mike. I don't think it's a good idea to implicitly create data
>>> regions on client node. If one wants to have a local there, they should
>>> implicitly provide data region configuration (default or otherwise). If
>>> data region is not configured, then we should throw proper exception
>>> instead of NPE.
>>>
>>> -Val
>>>
>>> On Thu, Feb 1, 2018 at 10:54 AM, Michael Cherkasov <
>>> michael.cherkasov@gmail.com> wrote:
>>>
>>> Hi Dmitry,
>>>>
>>>> I think we should make a user to explicitly create data region on a
>>>> client.
>>>>
>>>> Client nodes aren't supposed to be used for data storing, so if someone
>>>> what to use a local cache on a client node, let's make him/her create
>>>> data
>>>> region explicitly. Just to make sure that user knows what he/she is
>>>> doing.
>>>>
>>>> Thanks,
>>>> Mike.
>>>>
>>>>
>>>> 2018-02-01 7:36 GMT-08:00 Dmitry Karachentsev <
>>>> dkarachentsev@gridgain.com
>>>>
>>>>> :
>>>>> Hello everyone!
>>>>>
>>>>> We have an erroneous use case when client tries to create LOCAL cache,
>>>>>
>>>> but
>>>>
>>>>> by default it does not initiates default data region. So client gets
>>>>>
>>>> NPE.
>>>>
>>>>> [1]
>>>>>
>>>>> I think it should be a lazy data region initialization on client. Do
>>>>> you
>>>>> have any concerns about this approach or other proposals?
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/IGNITE-7572
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>>
>>>
>
Re: LOCAL cache on client
Posted by Dmitry Karachentsev <dk...@gridgain.com>.
Sounds pretty reasonable for me, so fix will entail just in proper
exception.
Maybe it worth to show warning that says that's no data region
configured and it's not possible to create LOCAL cache?
Thanks!
02.02.2018 00:08, Valentin Kulichenko пишет:
> I meant "they should *explicitly* provide data region configuration", of
> course.
>
> -Val
>
> On Thu, Feb 1, 2018 at 10:58 AM, Valentin Kulichenko <
> valentin.kulichenko@gmail.com> wrote:
>
>> Agree with Mike. I don't think it's a good idea to implicitly create data
>> regions on client node. If one wants to have a local there, they should
>> implicitly provide data region configuration (default or otherwise). If
>> data region is not configured, then we should throw proper exception
>> instead of NPE.
>>
>> -Val
>>
>> On Thu, Feb 1, 2018 at 10:54 AM, Michael Cherkasov <
>> michael.cherkasov@gmail.com> wrote:
>>
>>> Hi Dmitry,
>>>
>>> I think we should make a user to explicitly create data region on a
>>> client.
>>>
>>> Client nodes aren't supposed to be used for data storing, so if someone
>>> what to use a local cache on a client node, let's make him/her create data
>>> region explicitly. Just to make sure that user knows what he/she is doing.
>>>
>>> Thanks,
>>> Mike.
>>>
>>>
>>> 2018-02-01 7:36 GMT-08:00 Dmitry Karachentsev <dkarachentsev@gridgain.com
>>>> :
>>>> Hello everyone!
>>>>
>>>> We have an erroneous use case when client tries to create LOCAL cache,
>>> but
>>>> by default it does not initiates default data region. So client gets
>>> NPE.
>>>> [1]
>>>>
>>>> I think it should be a lazy data region initialization on client. Do you
>>>> have any concerns about this approach or other proposals?
>>>>
>>>> [1] https://issues.apache.org/jira/browse/IGNITE-7572
>>>>
>>>> Thanks!
>>>>
>>>>
>>
Re: LOCAL cache on client
Posted by Valentin Kulichenko <va...@gmail.com>.
I meant "they should *explicitly* provide data region configuration", of
course.
-Val
On Thu, Feb 1, 2018 at 10:58 AM, Valentin Kulichenko <
valentin.kulichenko@gmail.com> wrote:
> Agree with Mike. I don't think it's a good idea to implicitly create data
> regions on client node. If one wants to have a local there, they should
> implicitly provide data region configuration (default or otherwise). If
> data region is not configured, then we should throw proper exception
> instead of NPE.
>
> -Val
>
> On Thu, Feb 1, 2018 at 10:54 AM, Michael Cherkasov <
> michael.cherkasov@gmail.com> wrote:
>
>> Hi Dmitry,
>>
>> I think we should make a user to explicitly create data region on a
>> client.
>>
>> Client nodes aren't supposed to be used for data storing, so if someone
>> what to use a local cache on a client node, let's make him/her create data
>> region explicitly. Just to make sure that user knows what he/she is doing.
>>
>> Thanks,
>> Mike.
>>
>>
>> 2018-02-01 7:36 GMT-08:00 Dmitry Karachentsev <dkarachentsev@gridgain.com
>> >:
>>
>> > Hello everyone!
>> >
>> > We have an erroneous use case when client tries to create LOCAL cache,
>> but
>> > by default it does not initiates default data region. So client gets
>> NPE.
>> > [1]
>> >
>> > I think it should be a lazy data region initialization on client. Do you
>> > have any concerns about this approach or other proposals?
>> >
>> > [1] https://issues.apache.org/jira/browse/IGNITE-7572
>> >
>> > Thanks!
>> >
>> >
>>
>
>
Re: LOCAL cache on client
Posted by Valentin Kulichenko <va...@gmail.com>.
Agree with Mike. I don't think it's a good idea to implicitly create data
regions on client node. If one wants to have a local there, they should
implicitly provide data region configuration (default or otherwise). If
data region is not configured, then we should throw proper exception
instead of NPE.
-Val
On Thu, Feb 1, 2018 at 10:54 AM, Michael Cherkasov <
michael.cherkasov@gmail.com> wrote:
> Hi Dmitry,
>
> I think we should make a user to explicitly create data region on a client.
>
> Client nodes aren't supposed to be used for data storing, so if someone
> what to use a local cache on a client node, let's make him/her create data
> region explicitly. Just to make sure that user knows what he/she is doing.
>
> Thanks,
> Mike.
>
>
> 2018-02-01 7:36 GMT-08:00 Dmitry Karachentsev <dkarachentsev@gridgain.com
> >:
>
> > Hello everyone!
> >
> > We have an erroneous use case when client tries to create LOCAL cache,
> but
> > by default it does not initiates default data region. So client gets NPE.
> > [1]
> >
> > I think it should be a lazy data region initialization on client. Do you
> > have any concerns about this approach or other proposals?
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-7572
> >
> > Thanks!
> >
> >
>
Re: LOCAL cache on client
Posted by Michael Cherkasov <mi...@gmail.com>.
Hi Dmitry,
I think we should make a user to explicitly create data region on a client.
Client nodes aren't supposed to be used for data storing, so if someone
what to use a local cache on a client node, let's make him/her create data
region explicitly. Just to make sure that user knows what he/she is doing.
Thanks,
Mike.
2018-02-01 7:36 GMT-08:00 Dmitry Karachentsev <dk...@gridgain.com>:
> Hello everyone!
>
> We have an erroneous use case when client tries to create LOCAL cache, but
> by default it does not initiates default data region. So client gets NPE.
> [1]
>
> I think it should be a lazy data region initialization on client. Do you
> have any concerns about this approach or other proposals?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-7572
>
> Thanks!
>
>