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

Remove WatcherType.Children break persistent watcher's child events

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.6.3, 3.7.0
    • 3.9.0
    • server
    • Hide
      Previously, removing WatcherType::Data or WatcherType::Children from AddWatchMode::Persistent will succeed in server side and part of AddWatchMode.PERSISTENT will be left behind. And we get persistent children or data watchers. We are never claiming to support these type of watchers and neither intend to do such "compute" in server side, so we decide to forbid this behavior. Such operation resulted in NOWATCHER in Java client anyway.
      Show
      Previously, removing WatcherType::Data or WatcherType::Children from AddWatchMode::Persistent will succeed in server side and part of AddWatchMode.PERSISTENT will be left behind. And we get persistent children or data watchers. We are never claiming to support these type of watchers and neither intend to do such "compute" in server side, so we decide to forbid this behavior. Such operation resulted in NOWATCHER in Java client anyway.

    Description

      AddWatchMode.PERSISTENT was divided as data and child watch in server side. When remove WatcherType.Children, child part of AddWatchMode.PERSISTENT is removed but not its data part. This could introduce trick usage of persistent data watch while there is no official api for this. It is better forbid this by dedicate WatcherType.Children to standard child watch only.

      I commits a modified RemoveWatchesTest.testRemoveAllChildWatchesOnAPath in my local repo to reproduce this.

      I think it is better to support removeWatches for two persistent watchers too. But it might be a separate issue.

      Attachments

        Issue Links

          Activity

            People

              kezhuw Kezhu Wang
              kezhuw Kezhu Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 2h
                  2h