You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by luqmanahmad <lu...@gmail.com> on 2017/07/10 14:24:42 UTC

split-brain processors

Hi,

I understand there is no functionality for split-brain problem in Apache
Ignite and is only available from GridGain side in their paid versions. We
have implemented our own SegmentationResolvers specific to our needs but
just found a catch in the default implementations.

I know we can provide our own implementation of SegmentationResolvers as
part of the ignite configuration, please correct me if I am wrong, but what
happens to IgniteConfiguration#isAllSegmentationResolversPassRequired()
setting. I can't see it anywhere in the code being used. How the multiple
SegmentationResolvers will be checked to pass the segmentation test ? After
spending sometime I found out that the default implementation of
GridSegmentationProcessor is doing nothing apart from returning true. 

From an API point of view different SegmentationResolver implementation
should be coming from the users but there should be an implementation
available to check all those resolvers which should be available to the
community.

If the above is true, can I suggest to have an implementation available of
GridSegmentationProcessor which just checks all the available
SegmentationResolvers and the default level settings defined inside the
ignite configuration ?

This shouldn't be too difficult to implement as we already got a
GridKernelContext available, I think. 

Let me know your thoughts - happy to work on this one.

Thanks,
Luqman 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/split-brain-processors-tp14590.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: split-brain processors

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Luqman,

SegmentationResolver is just an interface to user can implement custom
logic, but Ignite doesn't use it at all.
As Ignite doesn't provide split-brain functionality, you need to implement
a GridSegmentationProcessor.
So, configuration properties related to segmentation thing affect nothing.

Yes, GridKernelContext can be used in GridSegmentationProcessor.


On Mon, Jul 10, 2017 at 5:24 PM, luqmanahmad <lu...@gmail.com> wrote:

> Hi,
>
> I understand there is no functionality for split-brain problem in Apache
> Ignite and is only available from GridGain side in their paid versions. We
> have implemented our own SegmentationResolvers specific to our needs but
> just found a catch in the default implementations.
>
> I know we can provide our own implementation of SegmentationResolvers as
> part of the ignite configuration, please correct me if I am wrong, but what
> happens to IgniteConfiguration#isAllSegmentationResolversPassRequired()
> setting. I can't see it anywhere in the code being used. How the multiple
> SegmentationResolvers will be checked to pass the segmentation test ? After
> spending sometime I found out that the default implementation of
> GridSegmentationProcessor is doing nothing apart from returning true.
>
> From an API point of view different SegmentationResolver implementation
> should be coming from the users but there should be an implementation
> available to check all those resolvers which should be available to the
> community.
>
> If the above is true, can I suggest to have an implementation available of
> GridSegmentationProcessor which just checks all the available
> SegmentationResolvers and the default level settings defined inside the
> ignite configuration ?
>
> This shouldn't be too difficult to implement as we already got a
> GridKernelContext available, I think.
>
> Let me know your thoughts - happy to work on this one.
>
> Thanks,
> Luqman
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/split-brain-processors-tp14590.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Re: split-brain problem and GridSegmentationProcessor

Posted by luqmanahmad <lu...@gmail.com>.
See [1] for free network segmentation plugin

[1]  https://github.com/luqmanahmad/ignite-plugins
<https://github.com/luqmanahmad/ignite-plugins>  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by Amit Pundir <am...@gmail.com>.
Hi Anirudha, we can collaborate on this. Please drop me an email and we can
then discuss it.


Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by Anirudha Jadhav <an...@nyu.edu>.
we are just in the works of using a separate  zk cluster to provide an
implementation for segmentation resolution. If anyone else is working on it
we could collaborate.

or create a separate jira for a design review? what do you guys think? i
think we could also make zk itself pluggable

-Ani

On Tue, Nov 7, 2017 at 4:12 PM, luqmanahmad <lu...@gmail.com> wrote:

> Hi Amit,
>
> Correct you have to provide implementation for both.
>
> Your custom segmentation will just be validating something and that method
> of your segmentation resolver will be called inside the implementation of
> GridSegmentationProcess which can be overriden through your plugin. By
> default GridOsSegmentationProcessor is returning true and missing the whole
> logic of validating different resolvers.
>
> Makes sense ?
>
> Thanks,
> Luqman
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Anirudha P. Jadhav

Re: split-brain problem and GridSegmentationProcessor

Posted by luqmanahmad <lu...@gmail.com>.
Hi Amit,

Correct you have to provide implementation for both.

Your custom segmentation will just be validating something and that method
of your segmentation resolver will be called inside the implementation of
GridSegmentationProcess which can be overriden through your plugin. By
default GridOsSegmentationProcessor is returning true and missing the whole
logic of validating different resolvers.

Makes sense ?

Thanks,
Luqman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by Amit Pundir <am...@gmail.com>.
So do I need to implement SegmentationResolver as well as
GridSegmentationProcessor. Is that correct?

I am trying to understand how the GridSegmentationProcessor and
SegmentationResolver work in tandem.

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by luqmanahmad <lu...@gmail.com>.
Hi Amit,

Sorry I missed that part that you have to provide the
GridSegmentationProcessor implementation for both cases.

I did it through the plugin and it worked out of the box - I tested it
internally with 3 machines and through docker components as well.

See [1] for more information - it will clear your concepts.

http://apache-ignite-users.70518.x6.nabble.com/Two-Ignite-Clusters-formed-a=
fter-network-disturbance-td3377.html#a3673

Thanks,
Luqman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by Amit Pundir <am...@gmail.com>.
Thanks for the details Luqman.

I checked another post (link below) and it seems custom SegmentResolver
won't be processed. Were you able to make it work?

I want to restart the server node if it has disconnected from the cluster so
I don't need multiple resolvers.


Link -
http://apache-ignite-users.70518.x6.nabble.com/network-segmentation-td1772.html



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by luqmanahmad <lu...@gmail.com>.
Hi Amit,

There was no ticket raised for this one so I implemented the solution for
the company I worked in the past but dont have a copy with me. Its pretty
easy.

You can implement your custom segmentation resolvers (depending on your
needs) by implementing SegmentationResolver interface.

They are only required on the server side to validate your topology so its
upto your custom logic in SegmentationResolver, it could be anything.

If you are running through spring xml then you can make a jar of your
custom resolvers and drop them inside the lib/ext folder and set your
resolvers accordingly through setSegmentationResolvers (..) method.

There are also some other useful functions available, i dont remember from
the top of my head but have a look.

Above approach works out of the box for most of the cases but if you have
got multiple segmentation resolvers and you want all of them to be passed
for a valid topology, in that case you have to write a custom plugin to
override the default implementation of GridSegmentationProcessor which is
missing from Ignite and set your plugin in Ignite accordingly.

I hope it helps.

Thanks,
Luqman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: split-brain problem and GridSegmentationProcessor

Posted by Amit Pundir <am...@gmail.com>.
Hi Luqman,
Were you able to work on the custom implementation? If yes, is it available
for community use?
If no, need your help with a couple of questions - 

1. Is the SegmentationResolver needed for server nodes or client nodes?  
2. How would the server nodes pick up the implementation on start up as I
start server nodes using the ignite.sh script?
3. What other changes are required to make Ignite process the custom
resolver?


Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/