[ 
https://issues.apache.org/jira/browse/IGNITE-16361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Pyatkov updated IGNITE-16361:
---------------------------------------
    Description: 
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}
 
We cannot use an event with the same revision, because the invocation 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.

  was:
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.


> Unpredictable nested listener invocation
> ----------------------------------------
>
>                 Key: IGNITE-16361
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16361
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> 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}
>  
> We cannot use an event with the same revision, because the invocation 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)

Reply via email to