ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Muzafarov <maxmu...@gmail.com>
Subject Re: {DISCUSSION] Cluster read-only mode.
Date Tue, 04 Jun 2019 12:58:24 GMT
>> We throw CacheException on each update to read-only cluster. User code must handle
CacheException correctly .You could find test on it in ClusterReadOnlyModeTest#testDataStreamerReadOnly()

In this test, DataStreamer starts when the cluster already changes its
mode, but not before. Please, check my reproducer [1]. CacheException
is not thrown. Am I missing something?

[1] https://github.com/Mmuzaf/ignite/blob/readonly_streamer/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java#L72

On Tue, 4 Jun 2019 at 14:42, Sergey Antonov <antonovsergey93@gmail.com> wrote:
>
> Hello, Maxim!
>
> >> Do we have an IEP for this feature?
> No, we don't have.
>
> >> How we guarantee that all cache operations delivered (or not yet) to
> backups are not rejected by applied read-only request?
> I reused cluster activation mechanism. So enabling read-only mode generates
> an exchange on cluster. Cluster exchange guarantees update consistency
> between primary and backups.
>
> >> We should cancel the DataStreamer task or allow it to be finished.
> We throw CacheException on each update to read-only cluster. User code must
> handle CacheException correctly .You could find test on it in
> ClusterReadOnlyModeTest#testDataStreamerReadOnly()
>
> пн, 3 июн. 2019 г. в 20:15, Maxim Muzafarov <maxmuzaf@gmail.com>:
>
> > Sergey,
> >
> > Do we have an IEP for this feature?
> >
> > What should happen when on an active cluster with put operations if we
> > receive a read-only state change request? How we guarantee that all
> > cache operations delivered (or not yet) to backups are not rejected by
> > applied read-only request? I haven't found such tests in your PR.
> >
> > I've downloaded your branch and run some tests locally. I've tried
> > DataStreamer cache loads (allowOverwrite mode false) with a concurrent
> > cluster change state request to read-only mode and I've got strange
> > behaviour. My test scenario was:
> > 1) Start DataStremer cache load;
> > 2) change cluster to read-only state;
> > 3) change state back to normal;
> >
> > When the state has been changed to `read-only` I've flooded with a lot
> > of `Failed to perform cache operation (cluster is in read-only mode)`
> > errors, but when I've reverted the state back the DataStreamer
> > continue its load without any error. I think we should not allow such
> > behaviour. We should cancel the DataStreamer task or allow it to be
> > finished.
> >
> > On Fri, 31 May 2019 at 13:00, Sergey Antonov <antonovsergey93@gmail.com>
> > wrote:
> > >
> > > Hello, Zhenya, Maxim!
> > >
> > > Thank you for your replies!
> > >
> > > >> Should we also allow writes to the DistributedMetaStorage and if not
> > why?
> > > Yes. DistributedMetastorage available for updates with enabled read-only
> > > mode. I added test about it to ClusterReadOnlyModeSelfTest
> > >
> > > >> What's the purpose for ignite-sys-cache updates still be available
?
> > > ignite-sys-cache is using in the different subcomponents, for example,
> > > security.
> > >
> > > чт, 30 мая 2019 г. в 20:30, Zhenya Stanilovsky
> > <arzamas123@mail.ru.invalid>:
> > >
> > > > hi, Sergey.
> > > > What's the purpose for ignite-sys-cache updates still be available ?
> > > >
> > > > thanks !
> > > >
> > > > > Hello Igniters!
> > > > >
> > > > > I'm working on cluster read-only mode [1] feature. In this mode
> > cluster
> > > > > will be available only for read operations, all data modification
> > > > > operations in user caches will be rejected
> > > > > with ClusterReadOnlyModeCheckedException. This feature could be
> > helpfull
> > > > > for maintenance works (control.sh idle_verify/validate_indexes).
> > > > >
> > > > > A few points about cluster read-only mode:
> > > > > 1) Read-only mode could be enabled on active cluster only.
> > > > > 2) Read-only mode doens't store on PDS (i.e. after cluster restart
> > > > > enabled
> > > > > read-only mode will be forgotten)
> > > > > 3) Updates to ignite-sys-cache will be available with enabled
> > read-only
> > > > > mode.
> > > > >
> > > > > More informartion about implementation you could find in PR [2].
> > > > >
> > > > > What do you think about this feature?
> > > > >
> > > > > [1] https://issues.apache.org/jira/browse/IGNITE-11256
> > > > > [2] https://github.com/apache/ignite/pull/6423
> > > >
> > >
> > >
> > > --
> > > BR, Sergey Antonov
> >
>
>
> --
> BR, Sergey Antonov

Mime
View raw message