You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2022/01/24 09:46:00 UTC

[jira] [Created] (IGNITE-16361) Unpredictable nested listener invocation

Vladislav Pyatkov created IGNITE-16361:
------------------------------------------

             Summary: Unpredictable nested listener invocation
                 Key: IGNITE-16361
                 URL: https://issues.apache.org/jira/browse/IGNITE-16361
             Project: Ignite
          Issue Type: Bug
            Reporter: Vladislav Pyatkov


When you subscribe to any configuration property from another configuration listener, you are forced to use the pattern: 

{code}
configuration.property.listen((ctx) -> {
    configuration.anotherProperty.listen((nestedCtx) -> {    
        if (ctx.storageRevision() == nestedCtx.storageRevision())
            //Do nothing
        else
            //Some useful code.    
    })
})
{code}
 
Because an invocation with the same revision depends on traversal of the configuration tree.
A reasonable solution to avoid this pattern and prevent using of the unpredictable event is never notify nested listener about event that it was subscribed.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)