这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Conversation

@imalberto
Copy link

@imalberto imalberto commented Aug 19, 2016

This PR is backward compatible with ZooKeeper 3.4.x, but in order to use the RemoveWatcher API, ZooKeeper 3.5.x or later is required.

NOTE:

  • This PR adds a new API to the Conn struct: RemoveWatcher. Existing client code do not have to change since the other API contract is unchanged. But client application can use the new API as needed.
  • If client application attempt to use the API and have ZooKeeper server < 3.5.x deployed, ErrUnimplemented error will be returned.

Why is this needed ?

  • If your application is a long running daemon
  • Setups large number of watches which are never triggered
  • And there is need to remove these set watches and ensure there is no resource leakage

@imalberto imalberto closed this Aug 19, 2016
@imalberto imalberto reopened this Aug 19, 2016
@imalberto imalberto closed this Aug 19, 2016
@imalberto imalberto reopened this Aug 19, 2016
@imalberto imalberto changed the title Add RemoveWatcher() API. Requires ZooKeeper Server 3.5+ Add RemoveWatcher() API Aug 19, 2016
@imalberto imalberto closed this Aug 19, 2016
@imalberto imalberto reopened this Aug 19, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 81.995% when pulling f9118bd on imalberto:dev into e64db45 on samuel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 81.995% when pulling f9e4bfb on imalberto:dev into e64db45 on samuel:master.

@imalberto imalberto force-pushed the dev branch 2 times, most recently from ffe235a to cb13455 Compare August 24, 2016 03:13
@imalberto imalberto closed this Aug 24, 2016
@imalberto imalberto reopened this Aug 24, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+1.8%) to 82.396% when pulling cb13455 on imalberto:dev into e64db45 on samuel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.8%) to 82.396% when pulling 045f650 on imalberto:dev into e64db45 on samuel:master.

@imalberto
Copy link
Author

@samuel Any chance for you to help review this PR ? This change should be 100% backward compatible and should not break any existing applications. For those applications that creates large number of watches, this plugs a hole where these watchers are no longer of interests and since these watches may never be triggered, these resources are never released.

Disable adminserver
@coveralls
Copy link

Coverage Status

Coverage increased (+1.7%) to 82.864% when pulling 955288a on imalberto:dev into 87e1bca on samuel:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants