LOCAL cache on client

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

LOCAL cache on client

dkarachentsev
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!

Reply | Threaded
Open this post in threaded view
|

Re: LOCAL cache on client

Michael Cherkasov
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 <[hidden email]>:

> 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!
>
>
Reply | Threaded
Open this post in threaded view
|

Re: LOCAL cache on client

Valentin Kulichenko
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 <
[hidden email]> 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 <[hidden email]
> >:
>
> > 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!
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: LOCAL cache on client

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 <
[hidden email]> 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 <
> [hidden email]> 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 <[hidden email]
>> >:
>>
>> > 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!
>> >
>> >
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: LOCAL cache on client

dkarachentsev
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 <
> [hidden email]> 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 <
>> [hidden email]> 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 <[hidden email]
>>>> :
>>>> 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!
>>>>
>>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: LOCAL cache on client

Valentin Kulichenko
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 <
[hidden email]> 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 <
>> [hidden email]> 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 <
>>> [hidden email]> 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 <
>>>> [hidden email]
>>>>
>>>>> :
>>>>> 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!
>>>>>
>>>>>
>>>>>
>>>
>