[ https://issues.apache.org/jira/browse/IGNITE-7090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16336865#comment-16336865 ]
Tim Onyschak edited comment on IGNITE-7090 at 1/24/18 4:08 AM: --------------------------------------------------------------- [~vladisav] I agree, this is a better approach. However, from what i see in DataStructuresProcessor#semaphore() only get executed on the first time. In getAtomic if it exists it would be returned prior to the closure being executed. So just wondering what you would suggest for gaining access to GridCacheSemaphoreState. Seems to be a bit of hoops to get with in the semaphore method, outside of the closure. It was getting ugly when i was trying, but i could be missing something. 2 thoughts i have # In the getAtomic, prior to the return of an existing datastructure, check for a type of DS. If the DS implements a new or existing interface, we can run a validation and execute onNodeRemoved for any node found to be removed. # Add new interface that will abstract the validation within the Datastructure itself which can then validate from with in the Datastructures them self? Might be a question of where/how we want to do it, but will like to hear what you have to say. I think i like option 2, which can be bit more generic and i am not sure if other datastructures would want to run other logic. Thoughts? was (Author: timay): [~vladisav] I agree, this is a better approach. However, from what i see in DataStructuresProcessor#semaphore() only get executed on the first time. In getAtomic if it exists it would be returned prior to the closure being executed. So just wondering what you would suggest for gaining access to GridCacheSemaphoreState. Seems to be a bit of hoops to get with in the semaphore method, outside of the closure. It was getting ugly when i was trying, but i could be missing something. 2 thoughts i have In the getAtomic, prior to the return of an existing datastructure, check for a type of DS. If the DS implements a new or existing interface, we can run a validation and execute onNodeRemoved for any node found to be removed. Add new interface that will abstract the validation within the Datastructure itself which can then validate from with in the Datastructures them self? Might be a question of where/how we want to do it, but will like to hear what you have to say. I think i like option 2, which can be bit more generic and i am not sure if other datastructures would want to run other logic. Thoughts? > Semaphore Stuck when no acquirers to assign permit > -------------------------------------------------- > > Key: IGNITE-7090 > URL: https://issues.apache.org/jira/browse/IGNITE-7090 > Project: Ignite > Issue Type: Bug > Components: cache, data structures > Affects Versions: 2.1, 2.4 > Reporter: Tim Onyschak > Priority: Major > Fix For: 2.5 > > Attachments: SemaphoreFailoverNoWaitingAcquirerTest.java > > > If no acquirers are available to take permit of semaphore, the permit never > gets release and any further acquirerers will wait forever. > On node shut down DataStructuresProcessor.dsMap gets cleared out prior to > event listener being able to execute onNodeRemoved, hence owner is never > cleared out if it was unable to pass to a different acquirer. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)