Denis,

Thanks for quick reply,

I made a change and tested it with your example, everything looks fine.

Pull request is open and available at [1]

[1] https://github.com/apache/ignite/pull/2016

On Fri, May 26, 2017 at 8:25 PM, Denis Magda <dma...@apache.org> wrote:

> > I would suggest on the first iteration to simply ignore persistence
> > configuration on client nodes.
> > If client node finds persistence configuration on startup it will
> printout
> > warning message to log and proceed without persistence.
>
> +1 for this. Otherwise, it looks like a dirty hack when I need to add an
> empty MemoryConfiguration to a client config file. Plus, it requires us to
> create different configuration files for servers and clients which has to
> be optional by default.
>
> —
> Denis
>
> > On May 26, 2017, at 9:50 AM, Sergey Chugunov <sergey.chugu...@gmail.com>
> wrote:
> >
> > Moreover, enabling persistence on client node is very risky and may lead
> to
> > many tricky cases.
> >
> > I would suggest on the first iteration to simply ignore persistence
> > configuration on client nodes.
> > If client node finds persistence configuration on startup it will
> printout
> > warning message to log and proceed without persistence.
> >
> > Supporting persistence on client nodes definitely requires more
> thoughtful
> > discussion and may be added in the future.
> >
> > Thanks,
> > Sergey.
> >
> > On Fri, May 26, 2017 at 7:28 PM, Sergey Chugunov <
> sergey.chugu...@gmail.com>
> > wrote:
> >
> >> Denis,
> >>
> >> I see from example that you're trying to start a client node with
> >> persistence configuration specified and you're saying that Ignite must
> >> provide default MemoryConfiguration.
> >>
> >> But that contradicts with decision we all agreed on in the
> discussion[1]:
> >> if user wants to do something unusual on client nodes like storing cache
> >> partitions (or in this case persisting stuff) he/she *must *provide all
> >> necessary configuration explicitly.
> >>
> >> Server node with the same persistence configuration (and without
> explicit
> >> memory configuration) starts just fine.
> >>
> >> [1] http://apache-ignite-developers.2346864.n4.nabble.
> >> com/Question-local-cache-on-client-nodes-tt15950.html
> >>
> >> Thanks,
> >> Sergey.
> >>
> >> On Fri, May 26, 2017 at 7:03 PM, Denis Magda <dma...@apache.org> wrote:
> >>
> >>> Sergey,
> >>>
> >>> The issue vanishes as soon as I add the following to the configuration:
> >>>
> >>> <property name="memoryConfiguration">
> >>>    <bean class="org.apache.ignite.configuration.MemoryConfiguration">
> >>>    </bean>
> >>> </property>
> >>>
> >>> My point is that we just need to create a MemoryConfiguration
> implicitly
> >>> if it’s not defined (no any warnings or extra messages). It’s a
> >>> responsibility of our platform to generate a default configuration if
> it’s
> >>> not set explicitly.
> >>>
> >>> —
> >>> Denis
> >>>
> >>>> On May 26, 2017, at 8:46 AM, Sergey Chugunov <
> sergey.chugu...@gmail.com>
> >>> wrote:
> >>>>
> >>>> Hi Denis,
> >>>>
> >>>> What is the expected behavior in that case? Bug doesn't suggest any.
> >>>>
> >>>> From my point of view it would be better to throw an exception on
> >>> startup
> >>>> with meaningful message than to silently create a default
> >>>> MemoryConfiguration under the cover.
> >>>>
> >>>> Thanks,
> >>>> Sergey.
> >>>>
> >>>> On Fri, May 26, 2017 at 4:00 AM, Denis Magda <dma...@apache.org>
> wrote:
> >>>>
> >>>>> Igniters,
> >>>>>
> >>>>> I’ve just added the first Persistent Store example to the branch that
> >>>>> fosters the donation:
> >>>>> https://github.com/apache/ignite/tree/ignite-5267/
> >>>>> examples/src/main/java/org/apache/ignite/examples/persistentstore
> >>>>>
> >>>>> However, the example fails with an NPE if a MemoryConfiguration is
> not
> >>>>> defined explicitly:
> >>>>> https://issues.apache.org/jira/browse/IGNITE-5295
> >>>>>
> >>>>> Please those who are involved in the store development fix the issue
> by
> >>>>> the end of tomorrow. I want to complete with the technical
> >>> documentation
> >>>>> referring to a workable example.
> >>>>>
> >>>>> —
> >>>>> Denis
> >>>
> >>>
> >>
>
>

Reply via email to