curator.git
4 months agoCURATOR-630 Upgrade jetty to 9.4.latest (#413)
Horváth Dóra [Wed, 30 Mar 2022 13:15:35 +0000 (15:15 +0200)] 
CURATOR-630 Upgrade jetty to 9.4.latest (#413)

4 months agoSet currentStableVersion to 5.2.1
Enrico Olivelli [Thu, 17 Mar 2022 11:05:27 +0000 (12:05 +0100)] 
Set currentStableVersion to 5.2.1

4 months ago[maven-release-plugin] prepare for next development iteration
Enrico Olivelli [Mon, 14 Mar 2022 08:05:56 +0000 (09:05 +0100)] 
[maven-release-plugin] prepare for next development iteration

4 months ago[maven-release-plugin] prepare release apache-curator-5.2.1 apache-curator-5.2.1
Enrico Olivelli [Mon, 14 Mar 2022 08:05:46 +0000 (09:05 +0100)] 
[maven-release-plugin] prepare release apache-curator-5.2.1

5 months agoCURATOR-625 Bump directory maven plugin version to 1.0 (#402)
Nicolò Boschi [Mon, 28 Feb 2022 13:40:54 +0000 (14:40 +0100)] 
CURATOR-625 Bump directory maven plugin version to 1.0 (#402)

5 months agoCURATOR-633: Run TestConnectionStateManager tests in exact groups (#411)
tison [Sun, 27 Feb 2022 07:49:44 +0000 (15:49 +0800)] 
CURATOR-633: Run TestConnectionStateManager tests in exact groups (#411)

Signed-off-by: tison <wander4096@gmail.com>
5 months agoCURATOR-624: Fix Github Actions by adding 'distribution' for JDK setup step (#407)
Martin Grigorov [Fri, 25 Feb 2022 19:07:47 +0000 (21:07 +0200)] 
CURATOR-624: Fix Github Actions by adding 'distribution' for JDK setup step (#407)

5 months agoCURATOR-632: Update Maven plugins (#408)
Martin Grigorov [Fri, 25 Feb 2022 16:32:46 +0000 (18:32 +0200)] 
CURATOR-632: Update Maven plugins (#408)

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
7 months agoCURATOR-624 Migrate CI from Travis to GitHub actions (#403)
Nicolò Boschi [Wed, 15 Dec 2021 13:21:25 +0000 (14:21 +0100)] 
CURATOR-624 Migrate CI from Travis to GitHub actions (#403)

9 months agoCURATOR-561 Reset connection after repeat expiry 399/head 400/head
Scott Kirkpatrick [Wed, 3 Nov 2021 16:53:48 +0000 (12:53 -0400)] 
CURATOR-561 Reset connection after repeat expiry

If there is a problem posting the Expired KeeperState
during a session expiration, then the ZooKeeper event
thread will die without ever posting the Expired event.
This would then cause curator to keep trying to expire
the connection but it does nothing because the connection
is dead and no events will ever be posted.

This can be prevented by forcibly resetting the connection
if it's detected that the previous expiry had no effect

9 months agoReplace OutstandingOps with JDK bundled Phaser (#365)
tison [Sat, 16 Oct 2021 11:34:46 +0000 (19:34 +0800)] 
Replace OutstandingOps with JDK bundled Phaser (#365)

10 months agoCURATOR-606: ModeledFrameworkImpl.update(T model, int version): Use version in all...
Matthew E. Dawson [Mon, 4 Oct 2021 20:32:07 +0000 (16:32 -0400)] 
CURATOR-606: ModeledFrameworkImpl.update(T model, int version): Use version in all cases. (#393)

10 months agoCURATOR-607: InterProcessReadWriteLock should expose exposing getLockPath (#394)
faucct [Sun, 3 Oct 2021 19:11:49 +0000 (22:11 +0300)] 
CURATOR-607: InterProcessReadWriteLock should expose exposing getLockPath (#394)

Co-authored-by: Nikita Sokolov <faucct@yandex-team.ru>
11 months agoThis commit reverts changes that altered the ZPath parse method based on incorrect...
Ryan Ruel [Wed, 18 Aug 2021 14:57:42 +0000 (10:57 -0400)] 
This commit reverts changes that altered the ZPath parse method based on  incorrect assumptions about what a "resolved" ZPath actually is.

I've added a few notes to the JavaDoc and unit tests to hopefully clear up confusion in this area in the future.

11 months agoModified ZPathImpl's "isParameter()" method to properly check for parameters strings...
Ryan Ruel [Wed, 4 Aug 2021 19:20:18 +0000 (15:20 -0400)] 
Modified ZPathImpl's "isParameter()" method to properly check for parameters strings (values inside of a pair parameter delimiters).  This corrects issues with checking for path resolution status in certain cases.

Modified ZPathImpl's "resolved()" method to allow for substituted parameters to have leading path separators ("/"). This is useful in the case where a parameter is used for the first node element in the path, eliminating the need for the user to worry about the leading "/".

Added an additional unit test case for the leading "/" changes, and fixed bugs in the basic test cases that were accepting the wrong resolved state of tested ZPaths.

All unit tests for curator pass.

12 months agoCURATOR-610: Refactor CountCuratorWatcher in TestWatcherIdentity.java …
wx930910 [Mon, 9 Aug 2021 12:07:51 +0000 (14:07 +0200)] 
CURATOR-610: Refactor CountCuratorWatcher in TestWatcherIdentity.java …

Fixes [CURATOR-610](https://issues.apache.org/jira/browse/CURATOR-610)

### Description
Refactor test class [CountCuratorWatcher](https://github.com/apache/curator/blob/4a11aaef8b190dc220d35b7a91df294bfa06250e/curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatcherIdentity.java#L42) by using mocking object created by Mockito.

<hr>

##### Key changed/added classes in this PR
- Create mocking object to replace test subclass `CountCuratorWatcher`, decouple test from production code.
- Make test logic more clear by using method stub instead of method overriding.
- Extract AtomicInteger variable out of the test subclass. Use the extracted variable in assertation statement to check `process(WatchedEvent)` method invocation status.

<hr>

Author: wx930910 <wx19930910@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes #397 from wx930910/CURATOR-610

12 months agoUpdate currentStableVersion to 5.2.0
Cam McKenzie [Mon, 26 Jul 2021 07:13:02 +0000 (17:13 +1000)] 
Update currentStableVersion to 5.2.0

12 months ago[maven-release-plugin] prepare for next development iteration
Cam McKenzie [Mon, 19 Jul 2021 06:10:48 +0000 (16:10 +1000)] 
[maven-release-plugin] prepare for next development iteration

12 months ago[maven-release-plugin] prepare release apache-curator-5.2.0 apache-curator-5.2.0
Cam McKenzie [Mon, 19 Jul 2021 06:10:37 +0000 (16:10 +1000)] 
[maven-release-plugin] prepare release apache-curator-5.2.0

12 months agoCURATOR-599: Configurable ZookeeperFactory by ZKClientConfig
liran2000 [Thu, 15 Jul 2021 10:28:50 +0000 (12:28 +0200)] 
CURATOR-599: Configurable ZookeeperFactory by ZKClientConfig

Option to use ZooKeeper client config.

This seems mandatory for using zookeeper.request.timeout for preventing
the potential race condition of hanging indefinitely, as described at
the ticket.

Author: liran2000 <liran2000@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Zili Chen, Cameron McKenzie

Closes #391 from liran2000/CURATOR-599

12 months agoUse Awaitility to instead of Thread sleep method. (#389)
Qiang Zhao [Mon, 12 Jul 2021 10:50:55 +0000 (18:50 +0800)] 
Use Awaitility to instead of Thread sleep method. (#389)

13 months agoCURATOR-588 Upgrade ZooKeeper to 3.6.3 (#386)
Enrico Olivelli [Tue, 6 Jul 2021 09:06:58 +0000 (11:06 +0200)] 
CURATOR-588  Upgrade ZooKeeper to 3.6.3 (#386)

Co-authored-by: Enrico Olivelli <eolivelli@apache.org>
13 months agoCURATOR-602 fix typo in the variable (#390)
Colin Kuo [Mon, 5 Jul 2021 09:35:47 +0000 (02:35 -0700)] 
CURATOR-602 fix typo in the variable (#390)

Co-authored-by: Colin Kuo <colin.kuo@ruckuswireless.com>
14 months agoCURATOR-594: TestingZooKeeperMain isn't setting tickTime, if configured (#383)
Francesco Nigro [Wed, 26 May 2021 18:28:08 +0000 (20:28 +0200)] 
CURATOR-594: TestingZooKeeperMain isn't setting tickTime, if configured (#383)

16 months agoCURATOR-591: Update the PersistentNode documentation
Paul Boutes [Sun, 28 Mar 2021 14:44:22 +0000 (16:44 +0200)] 
CURATOR-591: Update the PersistentNode documentation

As a follow up of https://github.com/apache/curator/pull/380, we should update the `PersistentNode` doc.

Author: Paul Boutes <paul.boutes@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Zili Chen, Cameron McKenzie

Closes #381 from pboutes/CURATOR-591

16 months agoCURATOR-526: drop log level for message to debug
Ammar Khaku [Sun, 28 Mar 2021 14:41:42 +0000 (16:41 +0200)] 
CURATOR-526: drop log level for message to debug

ZooKeeper is backwards compatible and accepts older config
string formats, albeit without dynamic configuration
support. Since the older format is acceptable, we should not
log at error when we see the older format and should
instead simply log at debug.

Author: Ammar Khaku <ammar.khaku@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Russell Bolles

Closes #382 from akhaku/dropLogLevel

17 months agoCURATOR-590: Add option to disable parent creation for PersistentNode
Paul Boutes [Tue, 9 Mar 2021 07:11:49 +0000 (08:11 +0100)] 
CURATOR-590: Add option to disable parent creation for PersistentNode

Adds a `useParentCreation` boolean flag to control the parent creation.

If this flag is set to `false`, the `PersistentNode` won't create the underlying znodes with the `createParentContainersIfNeeded()`, meaning that the parent znodes will have to exist beforehand in order for the `PersistentNode` to succeed its creation.

The `useParentCreation` flag is set to `true` by default.

https://issues.apache.org/jira/browse/CURATOR-590

Author: Paul Boutes <paul.boutes@elastic.co>
Author: Paul Boutes <paul.boutes@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Cameron McKenzie <mckenzie.cam@gmail.com>, Zili Chen <wander4096@gmail.com>, Jordan Zimmerman <jordan@jordanzimmerman.com>

Closes #380 from pboutes/CURATOR-590

17 months agoCURATOR-584: Added fault tolerant idempotent Create, SetData and Delete operations
Josh Slocum [Tue, 15 Dec 2020 00:26:12 +0000 (18:26 -0600)] 
CURATOR-584: Added fault tolerant idempotent Create, SetData and Delete operations

18 months agoCURATOR-585: fix DiscoveryExample did not check for exceptions
wangjie [Mon, 18 Jan 2021 11:01:42 +0000 (12:01 +0100)] 
CURATOR-585: fix DiscoveryExample did not check for exceptions

Author: wangjie <wangchenmo1025@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes #375 from iwangjie/CURATOR-585

18 months agoadd workaround
Enrico Olivelli [Mon, 18 Jan 2021 10:59:15 +0000 (11:59 +0100)] 
add workaround

18 months agoUpgrade to Python 3
Enrico Olivelli [Mon, 18 Jan 2021 10:52:10 +0000 (11:52 +0100)] 
Upgrade to Python 3

18 months agoCURATOR-576 Import merge script from ZooKeeper project (#369)
Enrico Olivelli [Mon, 18 Jan 2021 10:46:44 +0000 (11:46 +0100)] 
CURATOR-576 Import merge script from ZooKeeper project (#369)

20 months agoMake Enrico Olivelli PMC chair
randgalt [Thu, 19 Nov 2020 00:47:33 +0000 (19:47 -0500)] 
Make Enrico Olivelli PMC chair

21 months agoCURATOR-582: Migrate to jUnit 5.6 (#372)
Tamás Pénzes [Tue, 20 Oct 2020 13:18:25 +0000 (15:18 +0200)] 
CURATOR-582: Migrate to jUnit 5.6 (#372)

22 months agoCURATOR-583: Fix ArrayIndexOutOfBoundsException when passing empty list parameter...
hjyun [Sat, 19 Sep 2020 07:50:42 +0000 (16:50 +0900)] 
CURATOR-583: Fix ArrayIndexOutOfBoundsException when passing empty list parameter to reconfigure API

This closes #374 .

23 months agoCURATOR-581. fix OSGi export pattern
tison [Mon, 24 Aug 2020 01:38:20 +0000 (09:38 +0800)] 
CURATOR-581. fix OSGi export pattern

23 months agoCURATOR-581. fix OSGi export pattern 373/head
tison [Fri, 21 Aug 2020 09:42:06 +0000 (17:42 +0800)] 
CURATOR-581. fix OSGi export pattern

23 months agoAdd tison as Committer and PMC
Enrico Olivelli [Fri, 14 Aug 2020 18:14:10 +0000 (20:14 +0200)] 
Add tison as Committer and PMC

23 months agoAdd tison as Committer and PMC 371/head
tison [Fri, 14 Aug 2020 17:17:08 +0000 (01:17 +0800)] 
Add tison as Committer and PMC

2 years agoCURATOR-577 - Add a dedicated downloads page to the website
Enrico Olivelli [Mon, 13 Jul 2020 07:08:57 +0000 (09:08 +0200)] 
CURATOR-577 - Add a dedicated downloads page to the website
fix downloads page, use Apache Mirros

2 years agoCURATOR-577 - Add a dedicated downloads page to the website 370/head
randgalt [Thu, 9 Jul 2020 22:11:47 +0000 (17:11 -0500)] 
CURATOR-577 - Add a dedicated downloads page to the website

Add a dedicated downloads page to the website. Note: this page depends
on the new property "currentStableVersion"

2 years ago[maven-release-plugin] prepare for next development iteration
Enrico Olivelli [Tue, 30 Jun 2020 13:03:19 +0000 (15:03 +0200)] 
[maven-release-plugin] prepare for next development iteration

2 years ago[maven-release-plugin] prepare release apache.curator-5.1.0 apache.curator-5.1.0
Enrico Olivelli [Tue, 30 Jun 2020 13:03:09 +0000 (15:03 +0200)] 
[maven-release-plugin] prepare release apache.curator-5.1.0

2 years agoUpdate README.md
Jordan Zimmerman [Thu, 25 Jun 2020 15:27:22 +0000 (10:27 -0500)] 
Update README.md

Added Twitter follow badge

2 years agoCURATOR-575: TestingServer shutdown can cause an NPE
randgalt [Thu, 25 Jun 2020 06:46:08 +0000 (08:46 +0200)] 
CURATOR-575: TestingServer shutdown can cause an NPE

TestingServer shutdown can cause an NPE due to FileTxnSnapLog being closed in a different thread

Author: randgalt <randgalt@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Cameron McKenzie <mckenzie.cam@gmail.com>

Closes #368 from Randgalt/CURATOR-575-fix-testing-server-npe

2 years agoCURATOR-574 DiscoveryService fatal error on deserializing an empty byte[] as JSON
Enrico Olivelli [Tue, 23 Jun 2020 11:28:23 +0000 (13:28 +0200)] 
CURATOR-574 DiscoveryService fatal error on deserializing an empty byte[] as JSON

2 years agoCURATOR-574 DiscoveryService fatal error on deserializing an empty byte[] as JSON 367/head
Enrico Olivelli [Mon, 15 Jun 2020 14:31:23 +0000 (16:31 +0200)] 
CURATOR-574 DiscoveryService fatal error on deserializing an empty byte[] as JSON

2 years agoMerge branch 'master' of https://github.com/apache/curator
Cam McKenzie [Mon, 15 Jun 2020 22:11:43 +0000 (08:11 +1000)] 
Merge branch 'master' of https://github.com/apache/curator

2 years agoAdd Enrico Olivelli as Committer and PMC
Enrico Olivelli [Fri, 12 Jun 2020 15:47:19 +0000 (17:47 +0200)] 
Add Enrico Olivelli as Committer and PMC

2 years agoMerge branch 'master' of https://github.com/apache/curator
Cam McKenzie [Wed, 3 Jun 2020 01:00:29 +0000 (11:00 +1000)] 
Merge branch 'master' of https://github.com/apache/curator

2 years agoFixed typo
Jordan Zimmerman [Wed, 20 May 2020 16:31:01 +0000 (11:31 -0500)] 
Fixed typo

2 years agoMore/better links in the Read Me
Jordan Zimmerman [Wed, 20 May 2020 16:30:30 +0000 (11:30 -0500)] 
More/better links in the Read Me

2 years agoFixed the website badge
Jordan Zimmerman [Wed, 20 May 2020 16:26:11 +0000 (11:26 -0500)] 
Fixed the website badge

2 years ago[maven-release-plugin] prepare for next development iteration
Cameron McKenzie [Mon, 18 May 2020 02:43:58 +0000 (12:43 +1000)] 
[maven-release-plugin] prepare for next development iteration

2 years ago[maven-release-plugin] prepare release apache-curator-5.0.0 apache-curator-5.0.0
Cameron McKenzie [Mon, 18 May 2020 02:43:48 +0000 (12:43 +1000)] 
[maven-release-plugin] prepare release apache-curator-5.0.0

2 years agoAdded some more icons
Jordan Zimmerman [Sat, 16 May 2020 04:49:08 +0000 (23:49 -0500)] 
Added some more icons

2 years agoAdded missing headers from CURATOR-569
randgalt [Fri, 15 May 2020 20:03:52 +0000 (15:03 -0500)] 
Added missing headers from CURATOR-569

2 years agoCURATOR-569
chevaris [Sun, 10 May 2020 16:41:05 +0000 (18:41 +0200)] 
CURATOR-569

- New methods to handle protected ZNode names

2 years agoCURATOR-558 was supposed to shade all of Guava - forgot to remove the exclusions...
randgalt [Sun, 10 May 2020 16:15:38 +0000 (11:15 -0500)] 
CURATOR-558 was supposed to shade all of Guava - forgot to remove the exclusions for the old guava classes that were still exposed. This was causing the installed JARs to be incorrect (missing the 3 shaded Guava classes) in the client JAR

2 years agotestDisconnectReconnectEventDoesNotFireValueWatcher() added as part of CURATOR-344...
randgalt [Sat, 9 May 2020 22:56:42 +0000 (17:56 -0500)] 
testDisconnectReconnectEventDoesNotFireValueWatcher() added as part of CURATOR-344 was flakey and would fail on the final assertion of numChangeEvents.get(). I don't believe you can be assured of the exact number so I made it more lenient and hopefully less flakey

2 years agomake testParentContainerMissing() more resilient by waiting for initial connection
randgalt [Sat, 9 May 2020 15:40:03 +0000 (10:40 -0500)] 
make testParentContainerMissing() more resilient by waiting for initial connection

2 years agotestDeleteChildrenConcurrently() was badly written and error prone. I fixed it so...
randgalt [Sat, 9 May 2020 14:46:05 +0000 (09:46 -0500)] 
testDeleteChildrenConcurrently() was badly written and error prone. I fixed it so it should run every time now

2 years agoCURATOR-544 - Fix issue with 'error code' 0 being passed to the KeeperExeception...
randgalt [Fri, 8 May 2020 13:00:41 +0000 (08:00 -0500)] 
CURATOR-544 - Fix issue with 'error code' 0 being passed to the KeeperExeception create method. This was breaking a lot of code

2 years agoJIRA:CURATOR-568
chevaris [Thu, 7 May 2020 07:22:30 +0000 (09:22 +0200)] 
JIRA:CURATOR-568

- Javadoc typo

2 years agoJIRA:CURATOR-568
chevaris [Wed, 6 May 2020 07:54:55 +0000 (09:54 +0200)] 
JIRA:CURATOR-568

- Adding ensembleTracker(boolean) and withEnsembleTracker() methods to
CuratorFrameworkFactory.builder() that allows enabling/disabling
ensemble tracking

2 years agoDocument breaking changes
tison [Thu, 7 May 2020 15:58:18 +0000 (23:58 +0800)] 
Document breaking changes

2 years agoAddress comments
tison [Thu, 7 May 2020 15:54:59 +0000 (23:54 +0800)] 
Address comments

2 years agoCURATOR-544: SessionFailedRetryPolicy
tison [Mon, 4 May 2020 04:51:29 +0000 (12:51 +0800)] 
CURATOR-544: SessionFailedRetryPolicy

2 years agoMerge branch 'master' of https://gitbox.apache.org/repos/asf/curator
randgalt [Wed, 22 Apr 2020 02:21:34 +0000 (21:21 -0500)] 
Merge branch 'master' of https://gitbox.apache.org/repos/asf/curator

2 years agoCURATOR-559 - background thread retries are spoiling the test. Try to work around... CURATOR-559-fix-nested-retry-loops-reopen 361/head
randgalt [Mon, 20 Apr 2020 22:14:41 +0000 (17:14 -0500)] 
CURATOR-559 - background thread retries are spoiling the test. Try to work around this

2 years agoCURATOR-559 - more attempts to keep tests from failing. Make sure count is zeroed...
randgalt [Sun, 19 Apr 2020 19:54:04 +0000 (14:54 -0500)] 
CURATOR-559 - more attempts to keep tests from failing. Make sure count is zeroed after server is stopped.

2 years ago[CURATOR-464] update classifier and document accordingly
bigmarvin [Mon, 20 Apr 2020 08:00:48 +0000 (16:00 +0800)] 
[CURATOR-464] update classifier and document accordingly

2 years agoMerge branch 'CURATOR-567-remove-test-clean-state-where-flaky'
randgalt [Sun, 19 Apr 2020 23:28:19 +0000 (18:28 -0500)] 
Merge branch 'CURATOR-567-remove-test-clean-state-where-flaky'

2 years agoCURATOR-567 - At this point, TestCleanState is so flakey we should just turn it off...
randgalt [Sun, 19 Apr 2020 23:26:13 +0000 (18:26 -0500)] 
CURATOR-567 - At this point, TestCleanState is so flakey we should just turn it off for now. It's not serving much purpose anyway.

2 years agoMerge branch 'CURATOR-567-remove-test-clean-state-where-flaky'
randgalt [Sun, 19 Apr 2020 21:30:52 +0000 (16:30 -0500)] 
Merge branch 'CURATOR-567-remove-test-clean-state-where-flaky'

2 years agoCURATOR-567 - TestCleanState.closeAndTestClean has meet is desired goal. Start removi...
randgalt [Sun, 19 Apr 2020 21:30:42 +0000 (16:30 -0500)] 
CURATOR-567 - TestCleanState.closeAndTestClean has meet is desired goal. Start removing it where it causes test flakiness

2 years agoCURATOR-559 test used InterProcessReadWriteLock - the problem is that the retry can... 359/head
randgalt [Sun, 19 Apr 2020 15:47:57 +0000 (10:47 -0500)] 
CURATOR-559 test used InterProcessReadWriteLock - the problem is that the retry can end up in background loop which has its own thread thereby spoiling the test. Instead use a foreground operation for consistent tests

2 years agoMerge branch 'master' of https://gitbox.apache.org/repos/asf/curator
randgalt [Sun, 19 Apr 2020 15:15:36 +0000 (10:15 -0500)] 
Merge branch 'master' of https://gitbox.apache.org/repos/asf/curator

2 years agoCURATOR-567 - remove flaky cases of TestCleanState CURATOR-567-remove-test-clean-state-where-flaky 358/head
randgalt [Sun, 19 Apr 2020 14:10:32 +0000 (09:10 -0500)] 
CURATOR-567 - remove flaky cases of TestCleanState

2 years agoMerge branch 'master' of github.com:bigmarvin/curator into CURATOR-464
randgalt [Sat, 18 Apr 2020 21:05:16 +0000 (16:05 -0500)] 
Merge branch 'master' of github.com:bigmarvin/curator into CURATOR-464

2 years agoCURATOR-525 - instead of resetting the connection, change the state to RECONNECTED...
randgalt [Thu, 2 Apr 2020 13:16:41 +0000 (08:16 -0500)] 
CURATOR-525 - instead of resetting the connection, change the state to RECONNECTED. I'm concerned about LOST/reset loops. This is still a bad hack and needs to be addressed in the future.

2 years agoCURATOR-525
randgalt [Wed, 1 Apr 2020 01:22:43 +0000 (20:22 -0500)] 
CURATOR-525

There is a race whereby the ZooKeeper connection can be healed before Curator is finished processing the new connection state. When this happens
the Curator instance becomes a Zombie stuck in the LOST state. This fix is a "hack". ConnectionStateManager will notice that the connection state is
LOST but that the Curator instance reports that it is connected. When this happens, it is logged and the connection is reset.

2 years agoFor CURATOR-559 make the test a bit more robust. Wait for the connection to go to...
randgalt [Thu, 9 Apr 2020 15:16:05 +0000 (10:16 -0500)] 
For CURATOR-559 make the test a bit more robust. Wait for the connection to go to LOST after server stop

2 years agoCURATOR-549
randgalt [Fri, 20 Mar 2020 19:48:18 +0000 (14:48 -0500)] 
CURATOR-549

Creates a simple bridge that, when using ZK 3.6.0 creates a CuratorCache, and for earlier versions creates a TreeCache. The curator-test-zk35 module ensures that both code paths are tested.

2 years agoCURATOR-549
randgalt [Sun, 29 Mar 2020 20:33:13 +0000 (15:33 -0500)] 
CURATOR-549

The next phase of this issue will implement a bridge cache that bridges TreeCache for pre 3.6 SK and CuratorCache for ZK 3.6+. That bridge will need this TreeCache iterator.

2 years agoCURATOR-549 (#335)
Jordan Zimmerman [Wed, 1 Apr 2020 03:52:41 +0000 (22:52 -0500)] 
CURATOR-549 (#335)

Adds several recipes that use the new ZOOKEEPER-1416 Persistent Recursive watches from ZooKeeper 3.6.0. PersistentWatcher - A wrapper recipe that keeps a persistent (single or recursive) watch set and active through disconnections, etc. CuratorCache - Completely re-written cache recipe that will replace TreeCache, NodeCache and PathChildrenCache. With the benefit of persistent recursive watchers, the implementation is far simpler, will use significantly less resources and network calls, be easier to support and should be more stable and performant. Wrappers for the older cache's listeners are provided to help with transitions.

Co-authored-by: randgalt <randgalt@apache.org>
2 years ago[CURATOR-464] attach orignal artifacts with classifier original 355/head
bigmarvin [Fri, 27 Mar 2020 06:35:14 +0000 (14:35 +0800)] 
[CURATOR-464] attach orignal artifacts with classifier original

2 years agoCURATOR-564 (#351)
Jordan Zimmerman [Mon, 23 Mar 2020 20:11:18 +0000 (15:11 -0500)] 
CURATOR-564 (#351)

Like was done for TestingServer, catch startup issues for TestingCluster and then re-recreate and re-start the cluster one time. Hopefully this will make the tests more stable.

Co-authored-by: randgalt <randgalt@apache.org>
2 years agoCURATOR-549 (#334)
Jordan Zimmerman [Fri, 20 Mar 2020 01:52:43 +0000 (20:52 -0500)] 
CURATOR-549 (#334)

Support persistent watchers in ZK 3.6+ while maintaining background compatibility with previous versions of ZK. Adds Curator Framework DSL calls to ZooKeeper's addWatch() method. Subsequent PRs will add recipes. Both the older Framework and the async Framework now have methods to add persistent watchers.

Co-authored-by: randgalt <randgalt@apache.org>
2 years ago[CURATOR-558] - Updates for ZooKeeper 3.6.0 (#350)
Jordan Zimmerman [Mon, 16 Mar 2020 17:12:53 +0000 (12:12 -0500)] 
[CURATOR-558] - Updates for ZooKeeper 3.6.0 (#350)

* CURATOR-558

Bring Curator up to ZooKeeper 3.5.6 in preparation for supporting persistent recursive watchers while maintaining background compatability with previous versions of ZK. Added a new module to make sure we maintain compatibility with ZK 3.5.x. ZooKeeper 3.6.0 has some significant changes from previous versions. The reconfig APIs have moved into a new class, ZooKeeperAdmin. This class existed in 3.5.x but wasn't required. Now it is. A bunch of little things changed in the ZK server code which affected Curator's test classes. I moved it all into reflection based calls in Compatibility.java in the test module. We now have modules that test ZK 3.4, 3.5 and 3.6 so we're safe with compatibility. ZooKeeper's MultiTransactionRecord has been removed it seems. That forced CuratorMultiTransactionRecord to be re-written. It's not a public class so hopefully it won't affect anyone.

There is a new module, curator-test-zk35. It forces ZooKeeper 3.5.6 and performs selected tests from the other modules to ensure compatibility. Tests annotated with TestNG groups zk35 and zk35Compatibility are tested. Group zk36 is excluded. Note: these tests will only run from Maven. I don't think IntelliJ/Eclipse support the Maven syntax I used.
Support persistent watchers in ZK 3.6+ while maintaining background compatability with previous versions of ZK. Added a new module to make sure we maintain comaptibility with ZK 3.5.x

* CURATOR-558 - change to version 5.0.0-SNAPSHOT

Co-authored-by: randgalt <randgalt@apache.org>
2 years agoCURATOR-558 (#344)
Jordan Zimmerman [Sat, 14 Mar 2020 23:13:56 +0000 (18:13 -0500)] 
CURATOR-558 (#344)

Pt1 of change

* Remove the ZK 3.4 compatibility module and code
* Remove the deprecated ListenerContainer that leaks Guava classes into our APIs
* Remove Exhibitor support
* Various minor changes/cleanups

Co-authored-by: randgalt <randgalt@apache.org>
2 years agoMerge branch 'master' of https://gitbox.apache.org/repos/asf/curator
randgalt [Sat, 14 Mar 2020 18:05:44 +0000 (13:05 -0500)] 
Merge branch 'master' of https://gitbox.apache.org/repos/asf/curator

2 years agoCURATOR-562 - Remove ConnectionHandlingPolicy - flatten out behavior to match old...
tison [Tue, 10 Mar 2020 16:25:13 +0000 (00:25 +0800)] 
CURATOR-562 - Remove ConnectionHandlingPolicy - flatten out behavior to match old StandardConnectionHandlingPolicy - closes #348

2 years agoCURATOR-562 - Remove ConnectionHandlingPolicy - flatten out behavior to match old...
tison [Tue, 10 Mar 2020 16:25:13 +0000 (00:25 +0800)] 
CURATOR-562 - Remove ConnectionHandlingPolicy - flatten out behavior to match old StandardConnectionHandlingPolicy

2 years agoCURATOR-559 (#346)
Jordan Zimmerman [Thu, 20 Feb 2020 03:27:10 +0000 (22:27 -0500)] 
CURATOR-559 (#346)

The retry loop mechanism ended up getting nested multiple times causing exponential calls to the retry policy and violating a given policy's limits. Use a thread local to mitigate this so that a retry loop is reused for nested API calls, etc.

2 years agoCURATOR-560 CURATOR-560-set-tick-time 347/head
randgalt [Tue, 18 Feb 2020 18:59:52 +0000 (13:59 -0500)] 
CURATOR-560

a) make sure setReuseAddress is set for server when getting a random port
b) always set "tickTime" and "minSessionTimeout" to make our tests run a bit faster
c) fixed incorrect exception message in blockUntilStarted()

2 years ago[CURATOR-548] Bump zookeeper version to 3.5.7
Oleksandr Porunov [Wed, 16 Oct 2019 08:30:04 +0000 (11:30 +0300)] 
[CURATOR-548] Bump zookeeper version to 3.5.7

2 years agoCURATOR-551 (#345)
Jordan Zimmerman [Wed, 12 Feb 2020 22:07:45 +0000 (17:07 -0500)] 
CURATOR-551 (#345)

Commit 26364c6186fc7c09a9462557b1ca791e9aa70006 (Sat Sep 26 13:13:02 2015) changed HandleHolder.getNewConnectionString() was changed to return the new connection string instead of just a boolean. I believe the value returned should have been ensembleProvider.getConnectionString() not helper.getConnectionString(). TBH I no longer remember the genesis of this change but I can't make the current implementation make sense.

Additionally, a change was made to optionally call zooKeeper.updateServerList(). When this path is taken the handle holder's connection needs to be updated as well or we'll get an infinite loop of changes. The path that runs when ensembleProvider.updateServerListEnabled() is false ends up setting handle holder's connection to ensembleProvider.getConnectionString().

I'm loathe to make such low level changes in code that's existed for a long time. But, my investigation shows that this is how it should be. Hopefully, users can do testing.

2 years agoMerge pull request #343 from naude-r/servicecache_thread_leak
Shay Shimony [Fri, 31 Jan 2020 15:27:51 +0000 (17:27 +0200)] 
Merge pull request #343 from naude-r/servicecache_thread_leak

[CURATOR-557] ServiceCacheImpl does not close ExecutorService

2 years ago- ServiceCacheImpl should allow the self-created executor service to be closed 343/head
Roelof Naude [Wed, 22 Jan 2020 13:04:37 +0000 (15:04 +0200)] 
- ServiceCacheImpl should allow the self-created executor service to be closed
- Allow an optional executor service for ServiceProvider