Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4472

Support persistent watchers removing individually

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.6.3, 3.7.0
    • 3.9.0
    • server
    • Hide
      Previously, client has to resort to WatcherType::Any to remove persistent watches. It is enough if client attaches only one watch mode per path. But after ZOOKEEPER-4466, we start to support different watches on one path officially, it becomes a serious problem as there could be other watch modes on path being removeWatches. So we decide to add WatcherType::Persistent and WatcherType::PersistentRecursive to remove persistent watch and persistent recursive watch respectively. This way, users of client can remove their watch even if there are other watch modes on that path. Still, users have to ensure there are no watchers with same watch mode on that path. But it is a pure Java Client issue. See ZOOKEEPER-4625 for reference.
      Show
      Previously, client has to resort to WatcherType::Any to remove persistent watches. It is enough if client attaches only one watch mode per path. But after ZOOKEEPER-4466 , we start to support different watches on one path officially, it becomes a serious problem as there could be other watch modes on path being removeWatches. So we decide to add WatcherType::Persistent and WatcherType::PersistentRecursive to remove persistent watch and persistent recursive watch respectively. This way, users of client can remove their watch even if there are other watch modes on that path. Still, users have to ensure there are no watchers with same watch mode on that path. But it is a pure Java Client issue. See ZOOKEEPER-4625 for reference.

    Description

      Persistent watchers could only be removed with WatcherType.Any now. I think it is meaningful to remove them individually as they are by naming persistent and will not auto removed in server side.

      Together with proposed solution from ZOOKEEPER-4466, it will be clear that ZooKeeper has four kind of watchers:

      1. Standard data watcher(which includes data and exist watcher in client side).
      2. Standard child watcher.
      3. Persistent node watcher(aka. data and child watcher for node).
      4. Persistent recursive watcher(aka. data watcher for node and its descendants).

      See also ZOOKEEPER-4471

      Attachments

        Issue Links

          Activity

            People

              kezhuw Kezhu Wang
              kezhuw Kezhu Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m