I think that I understand a reason for doing this: The most custom events which handle in 'GridDhtPartitionsExchangeFuture' are using only in PME flow and reason is release them for GC as soon as possible.
But there are some other systems which can listen to the same events, for example, to perform activation/deactivation actions them should handle [ChangeGlobalStateMessage, ChangeGlobalStateFinishMessage] which can be reset to 'null' by PME earlier then they will be handled by other systems. I'd suggest do not reset to 'null' custom messages in 'DiscoveryCustomEvent ' (at least without properly logic from the discovery-spi side). Thoughts? On Sat, Sep 29, 2018 at 11:43 PM Vyacheslav Daradur <daradu...@gmail.com> wrote: > > Hi Igniters! > > I think I found an illegal behavior in > GridDhtPartitionsExchangeFuture#onDone, the following code is called > here: > ((DiscoveryCustomEvent)firstDiscoEvt).customMessage(null); > > That means a global instance of 'DiscoveryCustomEvent' is being > mutated outside discovery-spi infrastructure. It also means that > discovery listeners receive 'DiscoveryCustomEvent' with 'null' field > instead of 'CustomMessage' which they may rely on. > > Could someone confirm if it is wrong behavior and should be fixed? > > -- > Best Regards, Vyacheslav D. -- Best Regards, Vyacheslav D.