GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/3940

    [backport 1.3] [FLINK-6612] Allow ZooKeeperStateHandleStore to lock created 
ZNodes

    Backport of #3939 onto the `release-1.3` branch.
    
    In order to guard against deletions of ZooKeeper nodes which are still 
being used
    by a different ZooKeeperStateHandleStore, we have to introduce a locking 
mechanism.
    Only after all ZooKeeperStateHandleStores have released their lock, the 
ZNode is
    allowed to be deleted.
    
    THe locking mechanism is implemented via ephemeral child nodes of the 
respective
    ZooKeeper node. Whenever a ZooKeeperStateHandleStore wants to lock a ZNode, 
thus,
    protecting it from being deleted, it creates an ephemeral child node. The 
node's
    name is unique to the ZooKeeperStateHandleStore instance. The delete 
operations
    will then only delete the node if it does not have any children associated.
    
    In order to guard against oprhaned lock nodes, they are created as 
ephemeral nodes.
    This means that they will be deleted by ZooKeeper once the connection of the
    ZooKeeper client which created the node timed out.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink 
addZooKeeperRefCountingBackport

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3940.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3940
    
----
commit ccb3ac8f2b64a357275d2967fcd440947becd272
Author: Till Rohrmann <[email protected]>
Date:   2017-05-17T12:52:04Z

    [FLINK-6612] Allow ZooKeeperStateHandleStore to lock created ZNodes
    
    In order to guard against deletions of ZooKeeper nodes which are still 
being used
    by a different ZooKeeperStateHandleStore, we have to introduce a locking 
mechanism.
    Only after all ZooKeeperStateHandleStores have released their lock, the 
ZNode is
    allowed to be deleted.
    
    THe locking mechanism is implemented via ephemeral child nodes of the 
respective
    ZooKeeper node. Whenever a ZooKeeperStateHandleStore wants to lock a ZNode, 
thus,
    protecting it from being deleted, it creates an ephemeral child node. The 
node's
    name is unique to the ZooKeeperStateHandleStore instance. The delete 
operations
    will then only delete the node if it does not have any children associated.
    
    In order to guard against oprhaned lock nodes, they are created as 
ephemeral nodes.
    This means that they will be deleted by ZooKeeper once the connection of the
    ZooKeeper client which created the node timed out.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to