Hi Nikita, 1. As I can understand, this functionality is needed if a custom message is needed to be processed only on the coordinator node. I'm not following for what purposes it was implemented and I see the real usage only in tests. As far as this functionality is not used in production code, I suggest to remove it. 2. This method needs if we want to perform a message mutation during sending it over the ring. Each node after message receive can mutate its state and resend to another node. I know only 2 mechanisms where this functionality is needed: binary metadata propagation and cluster-wide metrics collecting. From my side of view, this is poor approach and we should avoid discovery messages mutation and use only immutable messages. It can be removed from the custom message interface and marker interface should be introduced instead.
чт, 24 окт. 2019 г. в 16:35, Nikita Amelchev <nsamelc...@gmail.com>: > Hi, Igniters. > > The discovery custom message interface has two methods the use of > which is not clear to developers: > > 1. The stopProcess() method. Currently, it works only if the zookeeper > discovery configured. It doesn't work in TcpDiscoverySpi. I did not > find any usages of this method except tests. I suggest to remove it > from the discovery custom message interface. > > 2. The isMutable() method. It works in TcpDiscoverySpi but not in the > zookeeper SPI. Using this method is opaque to the developer when he > wants to add new features to the project. In general, it cannot be > used because may not be supported depending on the configuration. > Perhaps some functionality that uses it is not working correctly with > zookeeper configured. It seems we should avoid it in the custom > message interface too. > > WDYT? > > -- > Best wishes, > Amelchev Nikita >