svn commit: r69661 - in /dev/curator/5.7.0: ./ apache-curator-5.7.0-source-release.zip apache-curator-5.7.0-source-release.zip.asc apache-curator-5.7.0-source-release.zip.sha512
Author: tison Date: Tue Jun 11 09:54:09 2024 New Revision: 69661 Log: Staging Curator 5.7.0 Added: dev/curator/5.7.0/ dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip (with props) dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.asc dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.sha512 Added: dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip == Binary file - no diff available. Propchange: dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip -- svn:mime-type = application/octet-stream Added: dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.asc == --- dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.asc (added) +++ dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.asc Tue Jun 11 09:54:09 2024 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEizdEcvrTKOF/R5hjs3lpH8bimN0FAmZoHVkACgkQs3lpH8bi +mN314w/+O/4ZPO8gcbPy0ewIAOi7B9+OTGt77z9+X6/qpSHTLMWDCO0ERmOkaat2 +iuTkSlqSjfzUe/VYoFSM4VEwO28sWEr9r/cH9f9VExVD+wijO+OaxJXXS0zQ+g02 +O5J9VnzD9JwKBOe/T+MI9DrNCfW+I8jPa6svbSaYv7Y8aotD8/c2+ISljW21vGqU +d4zqs+L5hD4Gaqr+7RzSJzH6FM+MJm133VJfnW/LRtWHkZmskxfh94GfQUwuKkXP +K5cqsDostmg89qr47NwioeE9ISfvjlf6P5oq3oN/Iw4PAyqgyqe0A8YuJrYAU8w0 +T0HaRYOosFnDo1pc0dI0lorlJaxtjYmZDBhaGdCfJOu3U7Z7Zavh6t7XL/ugVCMw +t+FCjCl4IlHpLcQMr9yHoWZ4qUwnaDRxw/MVFHhbqCJeFVPfs1SX3NteSXUJB5lY +5WXm2HZufXomJBM/FBiV2Atmg6afOtYTA7wZG6pBUR6vwdYsFQfM3XzNIwI1V5Se +Oay6Iu3sLL7+qsgVU0WfeGvnaRYpKaqAW0buLW/bQf7KeinV27vsr/iDDwQrYbOd +AdgRxfaygqoxEl6LttDTaIkahx0PXyQO1yAfu1V0eS4U4cu2vCGdCuDojc3SHltN +BeXV4fI4RBPBPvmEvi595M/FQhSYC5GEY+P96QeL6I1jwypigLs= +=Kpkb +-END PGP SIGNATURE- Added: dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.sha512 == --- dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.sha512 (added) +++ dev/curator/5.7.0/apache-curator-5.7.0-source-release.zip.sha512 Tue Jun 11 09:54:09 2024 @@ -0,0 +1 @@ +566aa682a8d5b701e130c851bee38abb892893e23a2164f8b76efd40ed2413047c4c0bd227e7d69b1aabafb967f67f6edd747b5bfacce680f0cdb1195f6681c7 \ No newline at end of file
(curator) annotated tag apache-curator-5.7.0 updated (a57b94e4 -> 373421e2)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to annotated tag apache-curator-5.7.0 in repository https://gitbox.apache.org/repos/asf/curator.git *** WARNING: tag apache-curator-5.7.0 was modified! *** from a57b94e4 (commit) to 373421e2 (tag) tagging a57b94e4de88ef881618045dfa23ba642dd4f7db (commit) replaces apache-curator-5.6.0 by tison on Tue Jun 11 17:48:39 2024 +0800 - Log - [maven-release-plugin] copy for tag apache-curator-5.7.0 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEF9xBiPBkP8hcrYFNzYVky2oh5SYFAmZoHXcACgkQzYVky2oh 5Sbs5Q//d6SKq4dIgoJBObtMuvrgN4c4JCjX7JL3TTBvgUgwdReCVQTnqJQa57XA cwYPH8qoSzZ446EoF1dgLSdt6YAxD4iRzZbB4Zk7h11CivkbNbepr69nUq3CifAE EXdqcsStQLvpEa1u8xuPwKGyCamtAmC34wYVK8fMw4xOnzgAIJLBsdJ/9/kvzAEE ep56SiM7h1/QLKO2cYfKoIld7Gbio5GiQOkftfCcD8fuvxCVtoroSnJCms+G0LAS n8ThyQEi7ksVIinDNVUxZ2QlAl4HWQo6+sPeGNTPJ9AVhSOKnvj4zZ0tfVYWseo5 BAeoaXVGSJqigfrtViFuUlKcAaAaoex2uaKeRfdIdXw7QOTLbMMGEoxV9VwUW48z IswcKw/KVdDxAIRkKlnxDg7R73BwAtgqiF7h7ziYP4saauM/IWnnlHi1r0ADAF0f GpyEoMfFgB+IZA+frYa9ZeUXY0sL/YmGO6W9s3jPEQ7bJJZ6MV3xkjcmOWVZm5JS 1188tpjyD56nff1UZt6g4VKDJQuSmYKmpUo/F2SO3pMKpSsdElbp2XYc3Hhrhwi2 QFuwi/xkEwpPDJAEpwdW6tEjvQmtjFKn5eGWRK5OL4w3R6wJM8i1uRrtMQSsyZ4I 9APXiz233/tLl6XalJl1rBpyvz+tsaqikVtqwnEc4NIaVi3CNO8= =lk37 -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
(curator) branch master updated: CURATOR-706. Parallelize zk compatibility tests and unit tests (#502)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 5af54047 CURATOR-706. Parallelize zk compatibility tests and unit tests (#502) 5af54047 is described below commit 5af54047d3a1d85a8c08fae097b7bc1329f2a55c Author: Kezhu Wang AuthorDate: Mon May 27 14:19:02 2024 +0800 CURATOR-706. Parallelize zk compatibility tests and unit tests (#502) This reduces our ci time from 140 mins to 40 mins. --- .github/workflows/ci.yml | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db9cba2e..e1531236 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,40 @@ jobs: run: ./mvnw clean install -DskipTests - name: Test with ${{ matrix.java }} -run: ./mvnw verify +run: ./mvnw verify -pl '!curator-test-zk38,!curator-test-zk37,!curator-test-zk36,!curator-test-zk35' + + zk-compatibility-test: +name: ${{ matrix.zookeeper }} +runs-on: ubuntu-latest +timeout-minutes: 180 +strategy: + fail-fast: false + matrix: +zookeeper: [curator-test-zk38, curator-test-zk37, curator-test-zk36, curator-test-zk35] +env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} +steps: + - uses: actions/checkout@v3 + + - name: Cache Local Maven Repository +uses: actions/cache@v3 +with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | +${{ runner.os }}-maven- + + - name: Set up JDK 8 +uses: actions/setup-java@v3 +with: + java-version: 8 + distribution: 'zulu' + + - name: Build with JDK 8 +run: ./mvnw clean install -DskipTests + + - name: Test with JDK 8 +run: ./mvnw verify -pl ${{ matrix.zookeeper }} required: name: Required @@ -89,12 +122,14 @@ jobs: needs: - check - unittest + - zk-compatibility-test steps: - name: Guardian run: | if [[ ! ( \ "${{ needs.check.result }}" == "success" \ && "${{ needs.unittest.result }}" == "success" \ + && "${{ needs.zk-compatibility-test.result }}" == "success" \ ) ]]; then echo "Required jobs haven't been completed successfully." exit -1
(curator) branch master updated: CURATOR-696. Fix double leader for LeaderLatch (#500)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 1027c2cd CURATOR-696. Fix double leader for LeaderLatch (#500) 1027c2cd is described below commit 1027c2cdbbbac61436b8235b2be1729af4146d17 Author: tison AuthorDate: Tue May 21 22:59:34 2024 +0800 CURATOR-696. Fix double leader for LeaderLatch (#500) Signed-off-by: tison Co-authored-by: Kezhu Wang --- curator-recipes/pom.xml| 6 ++ .../framework/recipes/leader/LeaderLatch.java | 78 +- .../framework/recipes/leader/TestLeaderLatch.java | 65 +- 3 files changed, 116 insertions(+), 33 deletions(-) diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index 927af0c2..1ac5a8b7 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -83,6 +83,12 @@ test + +org.assertj +assertj-core +test + + org.awaitility awaitility diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java index 80509dbf..4d20f9af 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java @@ -509,7 +509,7 @@ public class LeaderLatch implements Closeable { getChildren(); } } else { -log.error("getChildren() failed. rc = " + event.getResultCode()); +log.error("getChildren() failed. rc = {}", event.getResultCode()); } } }; @@ -548,43 +548,57 @@ public class LeaderLatch implements Closeable { log.debug("checkLeadership with id: {}, ourPath: {}, children: {}", id, localOurPath, sortedChildren); if (ourIndex < 0) { -log.error("Can't find our node. Resetting. Index: " + ourIndex); +log.error("Can't find our node. Resetting. Index: {}", ourIndex); reset(); -} else if (ourIndex == 0) { -lastPathIsLeader.set(localOurPath); -setLeadership(true); -} else { -setLeadership(false); -String watchPath = sortedChildren.get(ourIndex - 1); -Watcher watcher = new Watcher() { -@Override -public void process(WatchedEvent event) { -if (state.get() == State.STARTED && event.getType() == Event.EventType.NodeDeleted) { -try { -getChildren(); -} catch (Exception ex) { -ThreadUtils.checkInterrupted(ex); -log.error("An error occurred checking the leadership.", ex); +return; +} + +if (ourIndex == 0) { +client.getData() +.inBackground((client, event) -> { +final long ephemeralOwner = +event.getStat() != null ? event.getStat().getEphemeralOwner() : -1; +final long thisSessionId = + client.getZookeeperClient().getZooKeeper().getSessionId(); +if (ephemeralOwner != thisSessionId) { +// this node is gone - reset +reset(); +} else { +lastPathIsLeader.set(localOurPath); +setLeadership(true); } -} -} -}; +}) +.forPath(localOurPath); +return; +} -BackgroundCallback callback = new BackgroundCallback() { -@Override -public void processResult(CuratorFramework client, CuratorEvent event) throws Exception { -if (event.getResultCode() == KeeperException.Code.NONODE.intValue()) { -// previous node is gone - retry getChildren +setLeadership(false); +String watchPath = sortedChildren.get(ourIndex - 1); +Watcher watcher = new Watcher() { +@Override +public void process(WatchedEvent event) { +if (state.get() == State.STARTED && event.getType() == Event.EventType.NodeDeleted) { +try { getChildren(); +
(curator) branch master updated: CURATOR-704. Add server compatibility check support (#497)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 82f2e534 CURATOR-704. Add server compatibility check support (#497) 82f2e534 is described below commit 82f2e53459d4905efaedc47493cedb649d934e46 Author: Laurent Goujon AuthorDate: Thu May 2 03:50:24 2024 -0700 CURATOR-704. Add server compatibility check support (#497) Add new interface ZookeeperCompatibility to represent server compatibility and the existing Compatibility class (which represents client compatibility). Enhance CuratorFramework to accept ZookeeperCompatibility instance, allowing users to specify which server version to target (default is LATEST). --- .../curator/utils/ZookeeperCompatibility.java | 71 ++ .../apache/curator/framework/CuratorFramework.java | 8 +++ .../curator/framework/CuratorFrameworkFactory.java | 11 .../framework/imps/CuratorFrameworkImpl.java | 14 - .../cache/CuratorCacheBridgeBuilderImpl.java | 3 +- .../java/org/apache/curator/zk35/TestIs35.java | 7 +++ .../java/org/apache/curator/zk36/TestIs36.java | 8 +++ .../x/async/details/AsyncCuratorFrameworkImpl.java | 5 +- 8 files changed, 119 insertions(+), 8 deletions(-) diff --git a/curator-client/src/main/java/org/apache/curator/utils/ZookeeperCompatibility.java b/curator-client/src/main/java/org/apache/curator/utils/ZookeeperCompatibility.java new file mode 100644 index ..a14c1a9f --- /dev/null +++ b/curator-client/src/main/java/org/apache/curator/utils/ZookeeperCompatibility.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.curator.utils; + +/** + * Describe feature supports based on server compatibility (as opposed to + * {@code Compatibility} which represents client compatibility. + */ +public class ZookeeperCompatibility { +/** + * Represent latest version with all features enabled + */ +public static final ZookeeperCompatibility LATEST = +builder().hasPersistentWatchers(true).build(); + +public static Builder builder() { +return new Builder(); +} + +public static class Builder { +// List of features introduced by Zookeeper over time. +// All values are set to false by default for backward compatibility +private boolean hasPersistentWatchers = false; + +public Builder hasPersistentWatchers(boolean value) { +this.hasPersistentWatchers = value; +return this; +} + +public boolean hasPersistentWatchers() { +return this.hasPersistentWatchers; +} + +public ZookeeperCompatibility build() { +return new ZookeeperCompatibility(this); +} +} + +private final boolean hasPersistentWatchers; + +private ZookeeperCompatibility(Builder builder) { +this.hasPersistentWatchers = builder.hasPersistentWatchers; +} + +/** + * Check if both client and server support persistent watchers + * + * @return {@code true} if both the client library and the server version + * support persistent watchers + */ +public boolean hasPersistentWatchers() { +return this.hasPersistentWatchers && Compatibility.hasPersistentWatchers(); +} +} diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index 25b701ca..50f6e56b 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -34,6 +34,7 @@ import org.apache.curator.framework.schema.SchemaSet; import org.apache.curator.framework.state.ConnectionStateErrorPolicy; import org.apache.curator.framework.state.ConnectionStateListener; import org.apache.curator.utils.EnsurePath; +import org.apache.curator.utils.ZookeeperCompatibility; import
(curator) branch dependabot/maven/curator-test-zk38/org.apache.zookeeper-zookeeper-3.8.4 deleted (was 7bff2fdc)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch dependabot/maven/curator-test-zk38/org.apache.zookeeper-zookeeper-3.8.4 in repository https://gitbox.apache.org/repos/asf/curator.git was 7bff2fdc Bump org.apache.zookeeper:zookeeper in /curator-test-zk38 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(curator) branch dependabot/maven/org.apache.zookeeper-zookeeper-3.7.3 deleted (was feaac0ba)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch dependabot/maven/org.apache.zookeeper-zookeeper-3.7.3 in repository https://gitbox.apache.org/repos/asf/curator.git was feaac0ba Bump org.apache.zookeeper:zookeeper from 3.5.7 to 3.7.3 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(curator) branch master updated: CURATOR-699. Upgrade ZooKeeper version to 3.9 (#496)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 972fffac CURATOR-699. Upgrade ZooKeeper version to 3.9 (#496) 972fffac is described below commit 972fffac7cf76fd5e6aadf586e6d2959b3750c76 Author: tison AuthorDate: Thu Feb 15 10:30:30 2024 +0800 CURATOR-699. Upgrade ZooKeeper version to 3.9 (#496) Signed-off-by: tison --- .github/workflows/ci.yml | 2 +- .../api/transaction/CuratorTransactionResult.java | 9 +--- .../framework/imps/TestTransactionsNew.java| 49 -- .../framework/imps/TestTransactionsOld.java| 22 +- .../curator/framework/imps/TransactionsHelper.java | 16 +++ .../recipes/leader/ChaosMonkeyCnxnFactory.java | 11 ++--- .../recipes/leader/TestLeaderSelectorEdges.java| 8 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 1 - {curator-test-zk36 => curator-test-zk37}/pom.xml | 9 ++-- .../java/org/apache/curator/zk37}/TestIs37.java| 4 +- .../src/test/resources/log4j.properties| 25 +++ {curator-test-zk36 => curator-test-zk38}/pom.xml | 16 --- .../java/org/apache/curator/zk38/TestIs38.java | 21 ++ .../src/test/resources/log4j.properties| 25 +++ .../test/compatibility/CuratorTestBase.java| 1 - pom.xml| 8 +++- 17 files changed, 133 insertions(+), 96 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b532a931..db9cba2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: unittest: name: Unit tests runs-on: ubuntu-latest -timeout-minutes: 120 +timeout-minutes: 180 strategy: fail-fast: false matrix: diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java b/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java index d0e5be84..bc710f72 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java @@ -43,13 +43,8 @@ public class CuratorTransactionResult { * @param forPath path * @return predicate */ -public static Predicate ofTypeAndPath(final OperationType type, final String forPath) { -return new Predicate() { -@Override -public boolean apply(CuratorTransactionResult result) { -return (result.getType() == type) && result.getForPath().equals(forPath); -} -}; +public static Predicate ofTypeAndPath(OperationType type, String forPath) { +return result -> (result.getType() == type) && result.getForPath().equals(forPath); } public CuratorTransactionResult(OperationType type, String forPath, String resultPath, Stat resultStat) { diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTransactionsNew.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTransactionsNew.java index c10e0f46..8595dd06 100644 --- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTransactionsNew.java +++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestTransactionsNew.java @@ -59,12 +59,7 @@ public class TestTransactionsNew extends BaseClassForTests { CuratorOp createOp1 = client.transactionOp().create().forPath("/bar"); CuratorOp createOp2 = client.transactionOp().create().forPath("/z/blue"); final BlockingQueue callbackQueue = new LinkedBlockingQueue<>(); -BackgroundCallback callback = new BackgroundCallback() { -@Override -public void processResult(CuratorFramework client, CuratorEvent event) throws Exception { -callbackQueue.add(event); -} -}; +BackgroundCallback callback = (client1, event) -> callbackQueue.add(event); client.transaction().inBackground(callback).forOperations(createOp1, createOp2); CuratorEvent event = callbackQueue.poll(new Timing().milliseconds(), TimeUnit.MILLISECONDS); assertNotNull(event); @@ -124,13 +119,13 @@ public class TestTransactionsNew extends BaseClassForTests { Collection results = client.transaction().forOperations(createOp1, createOp2, setDataOp, createOp3, deleteOp); -assertTrue(client.checkExist
svn commit: r66462 - /release/curator/5.4.0/
Author: tison Date: Mon Jan 8 08:52:13 2024 New Revision: 66462 Log: Archiving Curator release 5.4.0 Removed: release/curator/5.4.0/
svn commit: r66463 - /release/curator/5.5.0/
Author: tison Date: Mon Jan 8 08:52:21 2024 New Revision: 66463 Log: Archiving Curator release 5.5.0 Removed: release/curator/5.5.0/
svn commit: r66461 - /dev/curator/5.6.0/ /release/curator/5.6.0/
Author: tison Date: Mon Jan 8 08:51:50 2024 New Revision: 66461 Log: Release Curator 5.6.0 Added: release/curator/5.6.0/ - copied from r66460, dev/curator/5.6.0/ Removed: dev/curator/5.6.0/
(curator-site) branch update-release-templates deleted (was fc851f5)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git was fc851f5 Merge branch 'main' into update-release-templates The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(curator-site) branch update-release-templates updated (84bae55 -> fc851f5)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git from 84bae55 try fix ci add 8326bc7 fix: ASF event URL add aaf0c2e chore(deps): bump postcss from 8.4.27 to 8.4.31 (#2) add 750fd2f chore(deps): bump @babel/traverse from 7.22.10 to 7.23.2 (#3) add fc851f5 Merge branch 'main' into update-release-templates No new revisions were added by this update. Summary of changes: docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(curator-site) branch update-release-templates updated (ca31314 -> 84bae55)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git from ca31314 fixup actions add 84bae55 try fix ci No new revisions were added by this update. Summary of changes: .github/workflows/deploy.yml | 7 +- .yarnrc.yml | 1 - package.json | 3 +- pnpm-lock.yaml | 9221 + yarn.lock| 11259 - 5 files changed, 9225 insertions(+), 11266 deletions(-) delete mode 100644 .yarnrc.yml create mode 100644 pnpm-lock.yaml delete mode 100644 yarn.lock
(curator-site) branch update-release-templates updated (ad5e8b3 -> ca31314)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git from ad5e8b3 update actions add ca31314 fixup actions No new revisions were added by this update. Summary of changes: .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(curator) 01/01: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit 2f1fc4ebe5dd1ae451bc801b65dbe29129839f5e Author: tison AuthorDate: Wed Jan 3 00:31:09 2024 +0800 [maven-release-plugin] prepare for next development iteration --- curator-client/pom.xml | 4 ++-- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 4 ++-- curator-recipes/pom.xml| 4 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 2 +- curator-test/pom.xml | 4 ++-- curator-x-async/pom.xml| 2 +- curator-x-discovery-server/pom.xml | 4 ++-- curator-x-discovery/pom.xml| 4 ++-- pom.xml| 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index bcfb1e13..04ce3fca 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-client -5.6.0 +5.6.1-SNAPSHOT bundle Curator Client diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml index b860593f..e55fd769 100644 --- a/curator-examples/pom.xml +++ b/curator-examples/pom.xml @@ -26,7 +26,7 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-examples diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml index 3b291fa9..706c0009 100644 --- a/curator-framework/pom.xml +++ b/curator-framework/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-framework -5.6.0 +5.6.1-SNAPSHOT bundle Curator Framework diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index f548ea4e..927af0c2 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-recipes -5.6.0 +5.6.1-SNAPSHOT bundle Curator Recipes diff --git a/curator-test-zk35/pom.xml b/curator-test-zk35/pom.xml index b48e5b93..d9bfaf90 100644 --- a/curator-test-zk35/pom.xml +++ b/curator-test-zk35/pom.xml @@ -24,7 +24,7 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT 4.0.0 diff --git a/curator-test-zk36/pom.xml b/curator-test-zk36/pom.xml index a603cbbe..32261524 100644 --- a/curator-test-zk36/pom.xml +++ b/curator-test-zk36/pom.xml @@ -24,7 +24,7 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT 4.0.0 diff --git a/curator-test/pom.xml b/curator-test/pom.xml index a0aa4c25..ad61c1c3 100644 --- a/curator-test/pom.xml +++ b/curator-test/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-test -5.6.0 +5.6.1-SNAPSHOT Curator Testing Unit testing utilities. diff --git a/curator-x-async/pom.xml b/curator-x-async/pom.xml index 06584361..297e096e 100644 --- a/curator-x-async/pom.xml +++ b/curator-x-async/pom.xml @@ -24,7 +24,7 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT 4.0.0 diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml index 0c287ade..3f80af0e 100644 --- a/curator-x-discovery-server/pom.xml +++ b/curator-x-discovery-server/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-x-discovery-server -5.6.0 +5.6.1-SNAPSHOT bundle Curator Service Discovery Server diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml index 61870ccf..36821852 100644 --- a/curator-x-discovery/pom.xml +++ b/curator-x-discovery/pom.xml @@ -26,11 +26,11 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT curator-x-discovery -5.6.0 +5.6.1-SNAPSHOT bundle Curator Service Discovery diff --git a/pom.xml b/pom.xml index 46dd3940..34dccdcb 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ org.apache.curator apache-curator -5.6.0 +5.6.1-SNAPSHOT pom Apache Curator @@ -125,7 +125,7 @@ scm:git:https://gitbox.apache.org/repos/asf/curator.git scm:git:https://gitbox.apache.org/repos/asf/curator.git -apache-curator-5.6.0 +apache-curator-5.4.0
(curator) branch master updated (74ff3335 -> 2f1fc4eb)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/curator.git from 74ff3335 CURATOR-697. Upgrade Apache Parent POM to 31 (#495) add 4210bd71 [maven-release-plugin] prepare release apache-curator-5.6.0 new 2f1fc4eb [maven-release-plugin] prepare for next development iteration The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: curator-client/pom.xml | 4 ++-- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 4 ++-- curator-recipes/pom.xml| 4 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 2 +- curator-test/pom.xml | 4 ++-- curator-x-async/pom.xml| 2 +- curator-x-discovery-server/pom.xml | 4 ++-- curator-x-discovery/pom.xml| 4 ++-- pom.xml| 8 11 files changed, 20 insertions(+), 20 deletions(-)
(curator-site) branch update-release-templates updated (e2585d4 -> ad5e8b3)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git from e2585d4 chore: update release templates and for 5.6.0 add ad5e8b3 update actions No new revisions were added by this update. Summary of changes: .github/workflows/deploy.yml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)
(curator-site) 01/01: chore: update release templates and for 5.6.0
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git commit e2585d42d8d2f83feb1088b9a5a9bf885d718b7e Author: tison AuthorDate: Mon Jan 8 14:22:26 2024 +0800 chore: update release templates and for 5.6.0 Signed-off-by: tison --- community/releasing-curator.md | 4 ++-- src/pages/download.md | 10 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/community/releasing-curator.md b/community/releasing-curator.md index 3d2a609..3fcd8ad 100644 --- a/community/releasing-curator.md +++ b/community/releasing-curator.md @@ -123,7 +123,7 @@ The tag to be voted upon: https://github.com/apache/curator/releases/tag/apache-curator-X.X.X Curator's KEYS file containing PGP keys we use to sign the release: -https://www.apache.org/dist/curator/KEYS +https://downloads.apache.org/curator/KEYS [ ] +1 approve [ ] +0 no opinion @@ -165,7 +165,7 @@ Hello, The Apache Curator team is pleased to announce the release of version x.y.z. Apache Curator is a Java/JVM client library for Apache ZooKeeper[1], a distributed coordination service. Apache Curator includes a high-level API framework and utilities to make using Apache ZooKeeper much easier and more reliable. It also includes recipes for common use cases and extensions such as service discovery and a Java 8 asynchronous DSL. For more details, please visit the project website: htt [...] The download page for Apache Curator is here: -https://curator.apache.org/releases.html +https://curator.apache.org/download/ The binary artifacts for Curator are available from Maven Central and its mirrors. diff --git a/src/pages/download.md b/src/pages/download.md index bf65c6b..57aba35 100644 --- a/src/pages/download.md +++ b/src/pages/download.md @@ -14,9 +14,9 @@ You can verify the integrity of a downloaded release using the PGP signatures an ## Current release -* Current release: [apache-curator-5.5.0-source-release.zip](https://downloads.apache.org/curator/5.5.0/apache-curator-5.5.0-source-release.zip) -* PGP: [apache-curator-5.5.0-source-release.zip.asc](https://downloads.apache.org/curator/5.5.0/apache-curator-5.5.0-source-release.zip.asc) -* SHA-512: [apache-curator-5.5.0-source-release.zip.sha512](https://downloads.apache.org/curator/5.5.0/apache-curator-5.5.0-source-release.zip.sha512) +* Current release: [apache-curator-5.6.0-source-release.zip](https://downloads.apache.org/curator/5.6.0/apache-curator-5.6.0-source-release.zip) +* PGP: [apache-curator-5.6.0-source-release.zip.asc](https://downloads.apache.org/curator/5.6.0/apache-curator-5.6.0-source-release.zip.asc) +* SHA-512: [apache-curator-5.6.0-source-release.zip.sha512](https://downloads.apache.org/curator/5.6.0/apache-curator-5.6.0-source-release.zip.sha512) * Keys: [KEYS](https://downloads.apache.org/curator/KEYS) ## History @@ -25,6 +25,10 @@ Below is a detailed historical list of releases. Starting from 4.1.0, Apache Curator maintains only the current version and do monotonic releases; that is, no backport. +### 2024-01-08 Release 5.6.0 available + +See [Curator 5.6.0 Release Notes](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12314425=12353185) for details. + ### 2023-04-28 Release 5.5.0 available See [Curator 5.5.0 Release Notes](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12314425=12352495) for details.
(curator-site) branch update-release-templates created (now e2585d4)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch update-release-templates in repository https://gitbox.apache.org/repos/asf/curator-site.git at e2585d4 chore: update release templates and for 5.6.0 This branch includes the following new commits: new e2585d4 chore: update release templates and for 5.6.0 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(curator-site) branch dependabot/npm_and_yarn/babel/traverse-7.23.2 deleted (was 065ddbd)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch dependabot/npm_and_yarn/babel/traverse-7.23.2 in repository https://gitbox.apache.org/repos/asf/curator-site.git was 065ddbd chore(deps): bump @babel/traverse from 7.22.10 to 7.23.2 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(curator-site) branch main updated: chore(deps): bump @babel/traverse from 7.22.10 to 7.23.2 (#3)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 750fd2f chore(deps): bump @babel/traverse from 7.22.10 to 7.23.2 (#3) 750fd2f is described below commit 750fd2f7ca8133a8efd3793b2a6a8231ceef4e21 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Mon Jan 8 14:19:33 2024 +0800 chore(deps): bump @babel/traverse from 7.22.10 to 7.23.2 (#3) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.10 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 106 -- 1 file changed, 97 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index e44adec..1714a92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,6 +207,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.22.13": + version: 7.22.13 + resolution: "@babel/code-frame@npm:7.22.13" + dependencies: +"@babel/highlight": ^7.22.13 +chalk: ^2.4.2 + checksum: 22e342c8077c8b77eeb11f554ecca2ba14153f707b85294fcf6070b6f6150aae88a7b7436dd88d8c9289970585f3fe5b9b941c5aa3aa26a6d5a8ef3f292da058 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.22.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": version: 7.22.9 resolution: "@babel/compat-data@npm:7.22.9" @@ -273,6 +283,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/generator@npm:7.23.0" + dependencies: +"@babel/types": ^7.23.0 +"@jridgewell/gen-mapping": ^0.3.2 +"@jridgewell/trace-mapping": ^0.3.17 +jsesc: ^2.5.1 + checksum: 8efe24adad34300f1f8ea2add420b28171a646edc70f2a1b3e1683842f23b8b7ffa7e35ef0119294e1901f45bfea5b3dc70abe1f10a1917ccdfb41bed69be5f1 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -351,6 +373,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-environment-visitor@npm:7.22.5" @@ -368,6 +397,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: +"@babel/template": ^7.22.15 +"@babel/types": ^7.23.0 + checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 + languageName: node + linkType: hard + "@babel/helper-hoist-variables@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-hoist-variables@npm:7.22.5" @@ -493,6 +532,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-validator-identifier@npm:7.22.5" @@ -540,6 +586,17 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.22.13": + version: 7.22.20 + resolution: "@babel/highlight@npm:7.22.20" + dependencies: +"@babel/helper-validator-identifier": ^7.22.20 +chalk: ^2.4.2 +js-tokens: ^4.0.0 + checksum: 84bd034dca309a5e680083cd827a766780ca63cef37308404f17653d32366ea76262bd2364b2d38776232f2d01b649f26721417d507
(curator) annotated tag apache-curator-5.6.0 updated (4210bd71 -> 547a59a6)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to annotated tag apache-curator-5.6.0 in repository https://gitbox.apache.org/repos/asf/curator.git *** WARNING: tag apache-curator-5.6.0 was modified! *** from 4210bd71 (commit) to 547a59a6 (tag) tagging 4210bd712faaff85849d93baea913e6e3c6ba35d (commit) replaces apache-curator-5.5.0 by tison on Wed Jan 3 00:31:09 2024 +0800 - Log - [maven-release-plugin] copy for tag apache-curator-5.6.0 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEF9xBiPBkP8hcrYFNzYVky2oh5SYFAmWUOk0ACgkQzYVky2oh 5SbO4g//UAUKbA+Islh/Wkj/Q9AYABlPN/O/eko4FjM0in0ooS4DAIi6P5NUZmUQ Z3ZM1/1IqOYCt6+6ICvJbCiidv4DGX0YINCy9C7yn/wBE71AVvkdz1Fl8YQdhGzD L842z9NF0KtXc4i2vuwSK1d+9bhp0enSvR6Mfx8LKZK1e3h+TmcsTB/3qA1+rFGf NMklRWkCGlKpkSxgKOhYRHkjNl5o2EkTSmCfX0C7k6mfcad/j4w0y0jMOViJ/cJ2 +pYGwPq7/CnzwOa4MNOHpNKRLmALZg264Jg6RjYu7kRH34489K7VoZjP5BB7Uijz 9jsCBi7YYkc3MMLr807Vc2BB0NINaxiuLSse+q+/3P0YOHPzl131UL8UmipAjsi0 h+0BZl/jqnQi1DlJV0GVAqWFqyV6+LTyHWsTcsSphoN/pOvcF7GDWKfIwTMEOeJU Xq4oznpmFHIMYAp4H72zyFOSJzo/ALH9e4NsTlnq06bqyhgMcKKnT1nZ67OWjyTE udx32tc/3k/rg8tX26zLIuRR0WpXR05D5pge/7/iW+lhUQT4QjPEaer8Ymp3lgHs SKebfRgnZbYbTy6IC/UADeRpedpCtBUgm2w8OP01NpxjMdsAUfcFqRGVcAbRIyef Z/lrLIaa2T258iW61FJ4Xxeum6G0PmI4y1qS4o77K8Pbu8CUGQg= =JfGl -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
svn commit: r66389 - in /dev/curator: 5.5.0/ 5.6.0/ 5.6.0/apache-curator-5.6.0-source-release.zip 5.6.0/apache-curator-5.6.0-source-release.zip.asc 5.6.0/apache-curator-5.6.0-source-release.zip.sha512
Author: tison Date: Tue Jan 2 16:35:13 2024 New Revision: 66389 Log: Staging Curator 5.6.0 Added: dev/curator/5.6.0/ dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip (with props) dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.asc dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.sha512 Removed: dev/curator/5.5.0/ Added: dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip == Binary file - no diff available. Propchange: dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip -- svn:mime-type = application/octet-stream Added: dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.asc == --- dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.asc (added) +++ dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.asc Tue Jan 2 16:35:13 2024 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEizdEcvrTKOF/R5hjs3lpH8bimN0FAmWUOjYACgkQs3lpH8bi +mN0Aog//WHsWkukuGWtdroJ7MKDBe5SmhZAcLJJ9l7HNuunJQhTzGSWIbalFdta8 +42g/cBuRVY9+nd2WhE+cY1uz4PcgaKSbnaseerO+thGxv32mT/9gBGz4NH6Q0AZB +0Lb4+TlMBEoaz7rcbD6H/vnI79LEwEe0EE8EW5RJHtolHFv29UeYMgJ1KskGjo5z +Gs9cp4JrE5YJ8ckVxpbs+myZqlQMw/gM4FJZNdnzHHmUbEph45Or+JhTRd+nmF3a +fA9UGfPMsGb+WWWq/VLKro0jdUsILmRQVSWBfxplp1igOeJe9ADCB+CHiZDsAA5x +bZvG7jdklwnCNK3YRiYUyAh76GWujVIM8dsksw8WMox/PONw1J2/XhnuXofuB3Z8 +LAZVGIPDs5vKu45NMTHHAMULVTxZMf+17XWwyYS1GwaORuIPtGhk0mSDb/Wcy8Mj +v/8AcWHtHOKyuoTQTahpWaz/OYuKNnUvwZZueYvSt+U+2Wdk9rTYb20YAHgZgZLx +K/L60xilkgcucVedsIM78PWl04mSHTFV9h0e9JEv/9Zx4od/GP5/xJsn3WjMlA2f +1FkHeu4XPumTwWj1ASf0czZH2SDGn9xGtaGdY+awMhjlmuvY8ehmolqrSca3kURh +r7F23+btnemld3LGIX8qDAbF5tjeQcQTT3saVPgY3w6vDrB3n+c= +=Twrt +-END PGP SIGNATURE- Added: dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.sha512 == --- dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.sha512 (added) +++ dev/curator/5.6.0/apache-curator-5.6.0-source-release.zip.sha512 Tue Jan 2 16:35:13 2024 @@ -0,0 +1 @@ +cab7a41afeaef2a3b615fc033670b14194dc61d34b58ddaaa97d1e6987119aab22d1248cd597c70bee67da099a9cd07b0897d2587cf91715fb22a7f9ca4e23b8 \ No newline at end of file
(curator) branch master updated: CURATOR-697. Upgrade Apache Parent POM to 31 (#495)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 74ff3335 CURATOR-697. Upgrade Apache Parent POM to 31 (#495) 74ff3335 is described below commit 74ff333500b8e9ea6b299f4759303aad53877636 Author: tison AuthorDate: Tue Jan 2 22:36:29 2024 +0800 CURATOR-697. Upgrade Apache Parent POM to 31 (#495) Signed-off-by: tison --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 67a2f392..f9888c05 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.apache apache -21 +31 org.apache.curator
(curator) branch master updated: CURATOR-262. Fix sleepMs overflow (#490)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 111f3a6b CURATOR-262. Fix sleepMs overflow (#490) 111f3a6b is described below commit 111f3a6bdcd562db0493e52243e5cec933cc36ef Author: shenjianeng <30279020+shenjian...@users.noreply.github.com> AuthorDate: Wed Dec 20 12:44:37 2023 +0800 CURATOR-262. Fix sleepMs overflow (#490) Co-authored-by: shenjianeng --- .../src/main/java/org/apache/curator/retry/ExponentialBackoffRetry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-client/src/main/java/org/apache/curator/retry/ExponentialBackoffRetry.java b/curator-client/src/main/java/org/apache/curator/retry/ExponentialBackoffRetry.java index 929b3b37..44aac9bd 100644 --- a/curator-client/src/main/java/org/apache/curator/retry/ExponentialBackoffRetry.java +++ b/curator-client/src/main/java/org/apache/curator/retry/ExponentialBackoffRetry.java @@ -64,7 +64,7 @@ public class ExponentialBackoffRetry extends SleepingRetry { @Override protected long getSleepTimeMs(int retryCount, long elapsedTimeMs) { // copied from Hadoop's RetryPolicies.java -long sleepMs = baseSleepTimeMs * Math.max(1, random.nextInt(1 << (retryCount + 1))); +long sleepMs = (long) baseSleepTimeMs * Math.max(1, random.nextInt(1 << (retryCount + 1))); if (sleepMs > maxSleepMs) { log.warn(String.format("Sleep extension too large (%d). Pinning to %d", sleepMs, maxSleepMs)); sleepMs = maxSleepMs;
(curator) branch master updated: CURATOR-694. Improve test reliability by resolving nondeterministic order by sorting (#491)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new e9497317 CURATOR-694. Improve test reliability by resolving nondeterministic order by sorting (#491) e9497317 is described below commit e949731759f18f7d747651f6228ed24110367369 Author: Hannah Chi AuthorDate: Sat Dec 2 01:32:55 2023 -0600 CURATOR-694. Improve test reliability by resolving nondeterministic order by sorting (#491) --- .../org/apache/curator/framework/imps/EnsembleTracker.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java index 90cb3fc6..46538fa7 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java @@ -26,6 +26,9 @@ import java.io.ByteArrayInputStream; import java.io.Closeable; import java.net.InetAddress; import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.Properties; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -149,7 +152,12 @@ public class EnsembleTracker implements Closeable, CuratorWatcher { @VisibleForTesting public static String configToConnectionString(QuorumVerifier data) throws Exception { StringBuilder sb = new StringBuilder(); -for (QuorumPeer.QuorumServer server : data.getAllMembers().values()) { + +List servers = +new ArrayList<>(data.getAllMembers().values()); +Collections.sort(servers, (a, b) -> a.toString().compareTo(b.toString())); + +for (QuorumPeer.QuorumServer server : servers) { if (server.clientAddr == null) { // Invalid client address configuration in zoo.cfg continue;
(curator-site) branch main updated: chore(deps): bump postcss from 8.4.27 to 8.4.31 (#2)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new aaf0c2e chore(deps): bump postcss from 8.4.27 to 8.4.31 (#2) aaf0c2e is described below commit aaf0c2e4f3b0bd4777cc2769db380f3f2b595602 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Tue Oct 31 18:09:04 2023 +0800 chore(deps): bump postcss from 8.4.27 to 8.4.31 (#2) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 268caa1..e44adec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8732,13 +8732,13 @@ __metadata: linkType: hard "postcss@npm:^8.3.11, postcss@npm:^8.4.14, postcss@npm:^8.4.17, postcss@npm:^8.4.21": - version: 8.4.27 - resolution: "postcss@npm:8.4.27" + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 1cdd0c298849df6cd65f7e646a3ba36870a37b65f55fd59d1a165539c263e9b4872a402bf4ed1ca1bc31f58b68b2835545e33ea1a23b161a1f8aa6d5ded81e78 + checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea languageName: node linkType: hard
(curator-site) branch dependabot/npm_and_yarn/postcss-8.4.31 deleted (was 291d0e3)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch dependabot/npm_and_yarn/postcss-8.4.31 in repository https://gitbox.apache.org/repos/asf/curator-site.git was 291d0e3 chore(deps): bump postcss from 8.4.27 to 8.4.31 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(curator-site) branch main updated: fix: ASF event URL
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 8326bc7 fix: ASF event URL 8326bc7 is described below commit 8326bc75aec448624a5cdbb1fc56557222f9b4a5 Author: tison AuthorDate: Tue Oct 31 18:08:41 2023 +0800 fix: ASF event URL See https://lists.apache.org/thread/vtf382zrmj1c87h38l1ly1924brsrxj8. --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 98fe59c..7df6e7a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -72,7 +72,7 @@ const config = { items: [ {label: 'Foundation', to: 'https://www.apache.org/'}, {label: 'License', to: 'https://www.apache.org/licenses/'}, -{label: 'Events', to: 'https://www.apache.org/events/current-event'}, +{label: 'Events', to: 'https://www.apache.org/events/current-event.html'}, {label: 'Security', to: 'https://www.apache.org/security/'}, {label: 'Sponsorship', to: 'https://www.apache.org/foundation/sponsorship.html'}, {label: 'Privacy', to: 'https://privacy.apache.org/policies/privacy-policy-public.html'},
[curator] branch master updated: CURATOR-693. Bump ZooKeeper version to 3.7.2 (#489)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new f5fb6d10 CURATOR-693. Bump ZooKeeper version to 3.7.2 (#489) f5fb6d10 is described below commit f5fb6d109257e35de250af7d6c0090b42f2a18a2 Author: Sergey Nuyanzin AuthorDate: Tue Oct 24 05:13:50 2023 +0200 CURATOR-693. Bump ZooKeeper version to 3.7.2 (#489) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 553dc96a..67a2f392 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ true -3.7.1 +3.7.2 5.1.4 3.10.0 3.2.0
[curator] branch master updated: CURATOR-691. Compatible with JDK 21 (#484)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new a83a0b2e CURATOR-691. Compatible with JDK 21 (#484) a83a0b2e is described below commit a83a0b2e5590f1961439e48be86e34ace39e5979 Author: tison AuthorDate: Tue Oct 24 11:09:54 2023 +0800 CURATOR-691. Compatible with JDK 21 (#484) Signed-off-by: tison --- .github/workflows/ci.yml | 8 .mvn/extensions.xml | 4 ++-- .mvn/wrapper/maven-wrapper.properties | 2 +- pom.xml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f44bc2a..b532a931 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 17 - distribution: 'temurin' + java-version: 21 + distribution: 'zulu' - name: Check code style run: ./mvnw spotless:check @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: -java: [8, 11, 17] +java: [8, 11, 17, 21] env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} steps: @@ -74,7 +74,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - distribution: 'temurin' + distribution: 'zulu' - name: Build with ${{ matrix.java }} run: ./mvnw clean install -DskipTests diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 2fa9d8d6..5f04e1f2 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -24,11 +24,11 @@ com.gradle gradle-enterprise-maven-extension -1.17 +1.19.1 com.gradle common-custom-user-data-maven-extension -1.11.1 +1.12.4 diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index d8b2495a..ac184013 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/pom.xml b/pom.xml index 82f4447a..553dc96a 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ 3.0.0 3.3.2 3.0.0-M5 -2.36.0 +2.39.0 1.11.1 3.24.1-GA 2.2 @@ -936,7 +936,7 @@ -2.30.0 +2.38.0
[curator] branch master updated: CURATOR-692. Get rid of mockito (#485)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 2a94b2d7 CURATOR-692. Get rid of mockito (#485) 2a94b2d7 is described below commit 2a94b2d7971bf47c2c12554bcd4c2e95581f607a Author: tison AuthorDate: Wed Oct 11 20:01:55 2023 +0800 CURATOR-692. Get rid of mockito (#485) Signed-off-by: tison --- curator-client/pom.xml | 6 -- .../test/java/org/apache/curator/BasicTests.java | 12 ++- .../java/org/apache/curator/TestEnsurePath.java| 115 - .../java/org/apache/curator/TestRetryLoop.java | 8 +- curator-framework/pom.xml | 12 --- .../curator/framework/api/CuratorWatcher.java | 2 +- .../curator/framework/imps/TestFramework.java | 16 +-- .../framework/imps/TestWatcherIdentity.java| 63 +++ curator-recipes/pom.xml| 6 -- .../recipes/queue/TestDistributedDelayQueue.java | 20 ++-- .../recipes/queue/TestDistributedIdQueue.java | 6 +- .../queue/TestDistributedPriorityQueue.java| 20 ++-- .../recipes/queue/TestDistributedQueue.java| 15 ++- .../state/DummyConnectionStateListener.java| 22 ++-- curator-test-zk35/pom.xml | 12 --- curator-test-zk36/pom.xml | 12 --- pom.xml| 13 --- 17 files changed, 89 insertions(+), 271 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 43fd507d..f3192be9 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -62,12 +62,6 @@ slf4j-api - -org.mockito -mockito-core -test - - org.apache.curator curator-test diff --git a/curator-client/src/test/java/org/apache/curator/BasicTests.java b/curator-client/src/test/java/org/apache/curator/BasicTests.java index 58946934..02cff2be 100644 --- a/curator-client/src/test/java/org/apache/curator/BasicTests.java +++ b/curator-client/src/test/java/org/apache/curator/BasicTests.java @@ -27,6 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import org.apache.curator.ensemble.fixed.FixedEnsembleProvider; import org.apache.curator.retry.RetryOneTime; import org.apache.curator.test.BaseClassForTests; @@ -40,13 +41,16 @@ import org.apache.zookeeper.ZooKeeper; import org.awaitility.Awaitility; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; public class BasicTests extends BaseClassForTests { @Test public void testFactory() throws Exception { -final ZooKeeper mockZookeeper = Mockito.mock(ZooKeeper.class); -ZookeeperFactory zookeeperFactory = (connectString, sessionTimeout, watcher, canBeReadOnly) -> mockZookeeper; +final AtomicReference expectedZooKeeper = new AtomicReference<>(); +ZookeeperFactory zookeeperFactory = (connectString, sessionTimeout, watcher, canBeReadOnly) -> { +final ZooKeeper zooKeeper = new ZooKeeper(connectString, sessionTimeout, watcher, canBeReadOnly); +expectedZooKeeper.set(zooKeeper); +return zooKeeper; +}; CuratorZookeeperClient client = new CuratorZookeeperClient( zookeeperFactory, new FixedEnsembleProvider(server.getConnectString()), @@ -56,7 +60,7 @@ public class BasicTests extends BaseClassForTests { new RetryOneTime(1), false); client.start(); -assertEquals(client.getZooKeeper(), mockZookeeper); +assertEquals(client.getZooKeeper(), expectedZooKeeper.get()); } @Test diff --git a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java b/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java deleted file mode 100644 index 11e7de7b.. --- a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in
[curator] branch master updated: CURATOR-521. Check LeaderLatch#close(CloseMode) does not accept null (#481)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 3468ee91 CURATOR-521. Check LeaderLatch#close(CloseMode) does not accept null (#481) 3468ee91 is described below commit 3468ee91561534d5a748bfb06902725542d07347 Author: tison AuthorDate: Wed Sep 20 01:01:43 2023 +0800 CURATOR-521. Check LeaderLatch#close(CloseMode) does not accept null (#481) Signed-off-by: tison --- .../curator/framework/recipes/leader/LeaderLatch.java | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java index 2c01857e..80509dbf 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java @@ -188,6 +188,7 @@ public class LeaderLatch implements Closeable { * @throws IOException errors */ public void close(CloseMode closeMode) throws IOException { +Preconditions.checkNotNull(closeMode, "closeMode cannot be null"); internalClose(closeMode, true); } @@ -200,8 +201,6 @@ public class LeaderLatch implements Closeable { } } -Preconditions.checkNotNull(closeMode, "closeMode cannot be null"); - cancelStartTask(); try { @@ -214,17 +213,14 @@ public class LeaderLatch implements Closeable { client.getConnectionStateListenable().removeListener(listener); switch (closeMode) { -case NOTIFY_LEADER: { +case NOTIFY_LEADER: setLeadership(false); listeners.clear(); break; -} - -default: { +case SILENT: listeners.clear(); setLeadership(false); break; -} } } } @@ -457,13 +453,12 @@ public class LeaderLatch implements Closeable { * it is possible for null to be returned. The path, if any, * returned is not guaranteed to be valid at any point in the future as internal * state changes might require the instance to delete and create a new path. - * + * * However, the existence of ourPath doesn't mean that this instance * holds leadership. * - * @see #getLastPathIsLeader - * * @return lock node path or null + * @see #getLastPathIsLeader */ public String getOurPath() { return ourPath.get(); @@ -475,7 +470,7 @@ public class LeaderLatch implements Closeable { * Also, it is possible for null to be returned (for this instance never becomes * a leader). The path, if any, returned is not guaranteed to be valid at any point in the future * as internal state changes might require the instance to delete the path. - * + * * The existence of lastPathIsLeader means that this instance holds leadership. * * @return last lock node path that was leader ever or null
[curator] branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes deleted (was 18543788)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes in repository https://gitbox.apache.org/repos/asf/curator.git was 18543788 revert to 1038aa6d03f240fb8a8de9736adc51ccbcc9f5b6 solution The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[curator] branch master updated: CURATOR-690. CuratorCache fails to load the cache if there are more than 64k child znodes (#480)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 51483adb CURATOR-690. CuratorCache fails to load the cache if there are more than 64k child znodes (#480) 51483adb is described below commit 51483adb1d1dd3e43812b5d0ec7c03b6d1d05c7c Author: tison AuthorDate: Fri Sep 15 09:03:44 2023 +0800 CURATOR-690. CuratorCache fails to load the cache if there are more than 64k child znodes (#480) Signed-off-by: tison Co-authored-by: Ryan Ruel --- .../framework/recipes/cache/CuratorCacheImpl.java | 22 -- .../framework/recipes/cache/OutstandingOps.java| 49 ++ .../framework/recipes/cache/TestCuratorCache.java | 47 + .../org/apache/curator/test/BaseClassForTests.java | 2 +- 4 files changed, 106 insertions(+), 14 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java index 3fccc37b..23268f5e 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java @@ -19,7 +19,9 @@ package org.apache.curator.framework.recipes.cache; -import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_CHANGED; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_CREATED; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_DELETED; import static org.apache.zookeeper.KeeperException.Code.NONODE; import static org.apache.zookeeper.KeeperException.Code.OK; import com.google.common.annotations.VisibleForTesting; @@ -28,7 +30,6 @@ import com.google.common.collect.Sets; import java.util.Collections; import java.util.Optional; import java.util.Set; -import java.util.concurrent.Phaser; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.stream.Stream; @@ -59,13 +60,8 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { private final StandardListenerManager listenerManager = StandardListenerManager.standard(); private final Consumer exceptionHandler; -private final Phaser outstandingOps = new Phaser() { -@Override -protected boolean onAdvance(int phase, int registeredParties) { -callListeners(CuratorCacheListener::initialized); -return true; -} -}; +private final OutstandingOps outstandingOps = +new OutstandingOps(() -> callListeners(CuratorCacheListener::initialized)); private enum State { LATENT, @@ -191,10 +187,10 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { } else { handleException(event); } -outstandingOps.arriveAndDeregister(); +outstandingOps.decrement(); }; -outstandingOps.register(); +outstandingOps.increment(); client.getChildren().inBackground(callback).forPath(fromPath); } catch (Exception e) { handleException(e); @@ -218,10 +214,10 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { } else { handleException(event); } -outstandingOps.arriveAndDeregister(); +outstandingOps.decrement(); }; -outstandingOps.register(); +outstandingOps.increment(); if (compressedData) { client.getData().decompressed().inBackground(callback).forPath(fromPath); } else { diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java new file mode 100644 index ..81a1ac26 --- /dev/null +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/license
[curator] 01/02: speed up tests
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes in repository https://gitbox.apache.org/repos/asf/curator.git commit 929a89f6f09329c8597f0483c4b035ebc6525d48 Author: tison AuthorDate: Fri Sep 15 01:48:48 2023 +0800 speed up tests Signed-off-by: tison --- .../framework/recipes/cache/CuratorCacheImpl.java | 8 -- .../framework/recipes/cache/TestCuratorCache.java | 33 -- .../org/apache/curator/test/BaseClassForTests.java | 2 +- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java index 99913f4d..50760dd2 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java @@ -19,7 +19,9 @@ package org.apache.curator.framework.recipes.cache; -import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_CHANGED; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_CREATED; +import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.NODE_DELETED; import static org.apache.zookeeper.KeeperException.Code.NONODE; import static org.apache.zookeeper.KeeperException.Code.OK; import com.google.common.annotations.VisibleForTesting; @@ -64,8 +66,8 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { protected boolean onAdvance(int phase, int registeredParties) { callListeners(CuratorCacheListener::initialized); synchronized (CuratorCacheImpl.this) { -currentChildPhaser = rootPhaser; -} +currentChildPhaser = rootPhaser; +} return true; } }; diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCache.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCache.java index adfc0e41..fe37d674 100644 --- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCache.java +++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCache.java @@ -23,11 +23,14 @@ import static org.apache.curator.framework.recipes.cache.CuratorCache.Options.DO import static org.apache.curator.framework.recipes.cache.CuratorCacheListener.builder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicInteger; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; +import org.apache.curator.framework.api.transaction.CuratorOp; import org.apache.curator.retry.RetryOneTime; import org.apache.curator.test.compatibility.CuratorTestBase; import org.junit.jupiter.api.Tag; @@ -186,7 +189,10 @@ public class TestCuratorCache extends CuratorTestBase { final CuratorCacheStorage storage = new StandardCuratorCacheStorage(false); // Phaser has a hard-limit of 64k registrants; we need to create more than that to trigger the initial problem. -final int zNodeCount = 0x + 5; +final int zNodeCount = 0x + 5; + +// Bulk creations in multiOp for (1) speed up creations (2) not exceed jute.maxbuffer size. +final int bulkSize = 1; try (CuratorFramework client = CuratorFrameworkFactory.newClient( server.getConnectString(), timing.session(), timing.connection(), new RetryOneTime(1))) { @@ -194,20 +200,29 @@ public class TestCuratorCache extends CuratorTestBase { final CountDownLatch initializedLatch = new CountDownLatch(1); client.create().creatingParentsIfNeeded().forPath("/test"); - +final List creations = new ArrayList<>(); for (int i = 0; i < zNodeCount; i++) { -client.create().forPath("/test/node_" + i); + creations.add(client.transactionOp().create().forPath("/test/node_" + i)); +if (creations.size() > bulkSize) { +client.transaction().forOperations(creations); +creations.clear(); +} } +client.transaction().forOperations(creations); +creations
[curator] 02/02: revert to 1038aa6d03f240fb8a8de9736adc51ccbcc9f5b6 solution
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes in repository https://gitbox.apache.org/repos/asf/curator.git commit 18543788669af270b51af291aac6185068896ad5 Author: tison AuthorDate: Fri Sep 15 02:05:22 2023 +0800 revert to 1038aa6d03f240fb8a8de9736adc51ccbcc9f5b6 solution Signed-off-by: tison --- .../framework/recipes/cache/CuratorCacheImpl.java | 35 +++- .../framework/recipes/cache/OutstandingOps.java| 49 ++ 2 files changed, 55 insertions(+), 29 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java index 50760dd2..23268f5e 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java @@ -30,7 +30,6 @@ import com.google.common.collect.Sets; import java.util.Collections; import java.util.Optional; import java.util.Set; -import java.util.concurrent.Phaser; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.stream.Stream; @@ -61,28 +60,8 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { private final StandardListenerManager listenerManager = StandardListenerManager.standard(); private final Consumer exceptionHandler; -private final Phaser rootPhaser = new Phaser() { -@Override -protected boolean onAdvance(int phase, int registeredParties) { -callListeners(CuratorCacheListener::initialized); -synchronized (CuratorCacheImpl.this) { -currentChildPhaser = rootPhaser; -} -return true; -} -}; - -private Phaser currentChildPhaser = new Phaser(rootPhaser); - -private synchronized Phaser getPhaserAndRegister() { -if (currentChildPhaser.getRegisteredParties() >= 0x) { -currentChildPhaser = new Phaser(rootPhaser); -} - -currentChildPhaser.register(); - -return currentChildPhaser; -} +private final OutstandingOps outstandingOps = +new OutstandingOps(() -> callListeners(CuratorCacheListener::initialized)); private enum State { LATENT, @@ -199,8 +178,6 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { return; // children haven't changed } -final Phaser outstandingOps = getPhaserAndRegister(); - try { BackgroundCallback callback = (__, event) -> { if (event.getResultCode() == OK.intValue()) { @@ -210,9 +187,10 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { } else { handleException(event); } -outstandingOps.arriveAndDeregister(); +outstandingOps.decrement(); }; +outstandingOps.increment(); client.getChildren().inBackground(callback).forPath(fromPath); } catch (Exception e) { handleException(e); @@ -224,8 +202,6 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { return; } -final Phaser outstandingOps = getPhaserAndRegister(); - try { BackgroundCallback callback = (__, event) -> { if (event.getResultCode() == OK.intValue()) { @@ -238,9 +214,10 @@ class CuratorCacheImpl implements CuratorCache, CuratorCacheBridge { } else { handleException(event); } -outstandingOps.arriveAndDeregister(); +outstandingOps.decrement(); }; +outstandingOps.increment(); if (compressedData) { client.getData().decompressed().inBackground(callback).forPath(fromPath); } else { diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java new file mode 100644 index ..81a1ac26 --- /dev/null +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the Li
[curator] branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes created (now 18543788)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-690.-CuratorCache-fails-to-load-the-cache-if-there-are-more-than-64K-child-ZNodes in repository https://gitbox.apache.org/repos/asf/curator.git at 18543788 revert to 1038aa6d03f240fb8a8de9736adc51ccbcc9f5b6 solution This branch includes the following new commits: new 929a89f6 speed up tests new 18543788 revert to 1038aa6d03f240fb8a8de9736adc51ccbcc9f5b6 solution The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[curator] branch master updated: Enable four letter word commands in testing server
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new dc1cd9f5 Enable four letter word commands in testing server dc1cd9f5 is described below commit dc1cd9f5f6985dd1aa04f51c8af4de7ba68a955c Author: tison AuthorDate: Wed Sep 13 22:50:12 2023 +0800 Enable four letter word commands in testing server --- .../java/org/apache/curator/test/ZooKeeperServerEmbeddedAdapter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/curator-test/src/main/java/org/apache/curator/test/ZooKeeperServerEmbeddedAdapter.java b/curator-test/src/main/java/org/apache/curator/test/ZooKeeperServerEmbeddedAdapter.java index 553c4b5c..3954fc71 100644 --- a/curator-test/src/main/java/org/apache/curator/test/ZooKeeperServerEmbeddedAdapter.java +++ b/curator-test/src/main/java/org/apache/curator/test/ZooKeeperServerEmbeddedAdapter.java @@ -46,6 +46,7 @@ public class ZooKeeperServerEmbeddedAdapter implements ZooKeeperMainFace { try { final Properties properties = configBuilder.buildProperties(); properties.put("admin.enableServer", "false"); +properties.put("4lw.commands.whitelist", "*"); final Path dataDir = Paths.get(properties.getProperty("dataDir")); zooKeeperEmbedded = ZooKeeperServerEmbedded.builder()
[curator] branch master updated: GH autolink to CURATOR Jira issues
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 72beebc5 GH autolink to CURATOR Jira issues 72beebc5 is described below commit 72beebc504d90338ded9a68ae0f6b79f5c8986fd Author: tison AuthorDate: Thu Aug 24 18:18:41 2023 +0800 GH autolink to CURATOR Jira issues --- .asf.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.asf.yaml b/.asf.yaml index 953d24ef..278d5fc7 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -34,6 +34,8 @@ github: rebase: true protected_branches: master: {} + autolink_jira: +- CURATOR notifications: commits: commits@curator.apache.org
[curator-site] 02/02: fix: open static javadoc site on a new tab so that it is force reloaded
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit d63af8b15ec3439eaf0218360513d9a2dc4e3b76 Author: tison AuthorDate: Wed Aug 16 08:52:40 2023 +0800 fix: open static javadoc site on a new tab so that it is force reloaded Otherwise, Docusaurus will try to route within the React App which cannot find the static site (since it's static, it isn't resigered on the React router). Signed-off-by: tison --- sidebars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index 0c03d3a..dee043f 100644 --- a/sidebars.js +++ b/sidebars.js @@ -74,7 +74,7 @@ const sidebars = { }, 'zk-compatibility-34', 'breaking-changes', -{type: 'link', label: 'Javadoc', href: '/apidocs/'}, +{type: 'link', label: 'Javadoc', href: 'pathname:///apidocs/'}, {type: 'link', label: 'Wiki', href: 'https://cwiki.apache.org/confluence/display/CURATOR'}, {type: 'html', defaultStyle: true, value: 'EXTENSIONS'}, 'service-discovery',
[curator-site] branch main updated (26ca411 -> d63af8b)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git from 26ca411 feat: generate javadoc (#1) new 20f8703 chore: ignore apidocs on dev new d63af8b fix: open static javadoc site on a new tab so that it is force reloaded The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore | 1 + sidebars.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
[curator-site] 01/02: chore: ignore apidocs on dev
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit 20f8703727590eafc7999163154822ab8659c779 Author: tison AuthorDate: Wed Aug 16 08:49:29 2023 +0800 chore: ignore apidocs on dev Signed-off-by: tison --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 53ea518..8031a40 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ # Generated files .docusaurus .cache-loader +/static/apidocs/ # Misc .DS_Store
[curator-site] branch main updated: feat: generate javadoc (#1)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 26ca411 feat: generate javadoc (#1) 26ca411 is described below commit 26ca4115c8968f8ab1fd48ceb84b41d72d1123c0 Author: tison AuthorDate: Wed Aug 16 08:13:27 2023 +0800 feat: generate javadoc (#1) Signed-off-by: tison --- .github/workflows/deploy.yml | 24 sidebars.js | 1 + 2 files changed, 25 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0521e78..56aeb65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,10 +24,34 @@ on: pull_request: jobs: + build-javadoc: +runs-on: ubuntu-latest +steps: + - uses: actions/checkout@v3 +with: + repository: 'apache/curator' + - uses: actions/setup-java@v3 +with: + distribution: temurin + java-version: '17' + - name: Build javadoc +run: mvn javadoc:aggregate + - name: Upload javadoc +uses: actions/upload-artifact@v3 +with: + name: javadoc + path: ./target/site/apidocs + deploy: runs-on: ubuntu-latest +needs: [build-javadoc] steps: - uses: actions/checkout@v3 + - name: Download javadoc +uses: actions/download-artifact@v3 +with: + name: javadoc + path: ./static/apidocs - uses: actions/setup-node@v3 with: node-version: 19.x diff --git a/sidebars.js b/sidebars.js index dabc210..0c03d3a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -74,6 +74,7 @@ const sidebars = { }, 'zk-compatibility-34', 'breaking-changes', +{type: 'link', label: 'Javadoc', href: '/apidocs/'}, {type: 'link', label: 'Wiki', href: 'https://cwiki.apache.org/confluence/display/CURATOR'}, {type: 'html', defaultStyle: true, value: 'EXTENSIONS'}, 'service-discovery',
[curator-site] branch javadoc deleted (was 0457ddf)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch javadoc in repository https://gitbox.apache.org/repos/asf/curator-site.git was 0457ddf feat: generate javadoc The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[curator-site] 01/01: feat: generate javadoc
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch javadoc in repository https://gitbox.apache.org/repos/asf/curator-site.git commit 0457ddfd23574050854e9565a12817bd814d1ba1 Author: tison AuthorDate: Wed Aug 16 07:57:01 2023 +0800 feat: generate javadoc Signed-off-by: tison --- .github/workflows/deploy.yml | 24 sidebars.js | 1 + 2 files changed, 25 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0521e78..56aeb65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,10 +24,34 @@ on: pull_request: jobs: + build-javadoc: +runs-on: ubuntu-latest +steps: + - uses: actions/checkout@v3 +with: + repository: 'apache/curator' + - uses: actions/setup-java@v3 +with: + distribution: temurin + java-version: '17' + - name: Build javadoc +run: mvn javadoc:aggregate + - name: Upload javadoc +uses: actions/upload-artifact@v3 +with: + name: javadoc + path: ./target/site/apidocs + deploy: runs-on: ubuntu-latest +needs: [build-javadoc] steps: - uses: actions/checkout@v3 + - name: Download javadoc +uses: actions/download-artifact@v3 +with: + name: javadoc + path: ./static/apidocs - uses: actions/setup-node@v3 with: node-version: 19.x diff --git a/sidebars.js b/sidebars.js index dabc210..0c03d3a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -74,6 +74,7 @@ const sidebars = { }, 'zk-compatibility-34', 'breaking-changes', +{type: 'link', label: 'Javadoc', href: '/apidocs/'}, {type: 'link', label: 'Wiki', href: 'https://cwiki.apache.org/confluence/display/CURATOR'}, {type: 'html', defaultStyle: true, value: 'EXTENSIONS'}, 'service-discovery',
[curator-site] branch javadoc created (now 0457ddf)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch javadoc in repository https://gitbox.apache.org/repos/asf/curator-site.git at 0457ddf feat: generate javadoc This branch includes the following new commits: new 0457ddf feat: generate javadoc The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[curator-site] branch main updated: docs: add section title for new committers onboarding
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 2512c7d docs: add section title for new committers onboarding 2512c7d is described below commit 2512c7df25d8ffbe9dc74c9eb973c2be58b41435 Author: tison AuthorDate: Tue Aug 15 17:10:28 2023 +0800 docs: add section title for new committers onboarding Signed-off-by: tison --- community/new-committers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/community/new-committers.md b/community/new-committers.md index 62d8581..4c5ca6d 100644 --- a/community/new-committers.md +++ b/community/new-committers.md @@ -1,5 +1,7 @@ # New Committers +## Onboarding + Welcome to Apache Curator! For new committers,
[curator-site] branch main updated: feat: add social card
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 1cb1ffc feat: add social card 1cb1ffc is described below commit 1cb1ffc443d131daa63e42bcfa5ca63c02ef9c04 Author: tison AuthorDate: Tue Aug 15 17:02:20 2023 +0800 feat: add social card Signed-off-by: tison --- docusaurus.config.js | 2 +- static/img/curator-highres.png | Bin 0 -> 654903 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 3b4a179..98fe59c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -42,7 +42,7 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ -image: 'img/docusaurus-social-card.jpg', +image: 'img/curator-highres.png', colorMode: { defaultMode: 'light', disableSwitch: true diff --git a/static/img/curator-highres.png b/static/img/curator-highres.png new file mode 100644 index 000..929569a Binary files /dev/null and b/static/img/curator-highres.png differ
[curator-site] branch main updated: fix: site repo link
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git The following commit(s) were added to refs/heads/main by this push: new 2bd1173 fix: site repo link 2bd1173 is described below commit 2bd117340a638342944e57584f17dadbb50aecda Author: tison AuthorDate: Tue Aug 15 16:34:01 2023 +0800 fix: site repo link Signed-off-by: tison --- community/index.md | 2 +- community/new-committers.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/community/index.md b/community/index.md index 6bc2741..de4b196 100644 --- a/community/index.md +++ b/community/index.md @@ -63,4 +63,4 @@ Enhancements or new feature proposals are also welcome. The more concrete and ra ## Source code * Curator core repository: https://github.com/apache/curator -* Curator website repository: https://github.com/apache/curator-website +* Curator website repository: https://github.com/apache/curator-site diff --git a/community/new-committers.md b/community/new-committers.md index fa5fbcf..62d8581 100644 --- a/community/new-committers.md +++ b/community/new-committers.md @@ -37,7 +37,7 @@ When doing a release you will be asked for your PGP password multiple times unle ### Maven Settings -Your Maven settings (`~/.m2/settings.xml`) file should have the following (Note that `curator-website-checkout-path` is used as a temporary path when deploying the Curator website): +Your Maven settings (`~/.m2/settings.xml`) file should have the following: ```xml
[curator-site] 05/05: fix: broken link to wiki.apache.org
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit ed363e7f9248dc349ae8bd52b764f056e90f2faf Author: tison AuthorDate: Tue Aug 15 16:32:41 2023 +0800 fix: broken link to wiki.apache.org Signed-off-by: tison --- docs/errors.md | 4 ++-- docs/tech-note-03.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/errors.md b/docs/errors.md index fe9a1cd..1b4af91 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -4,7 +4,7 @@ ZooKeeper is a very low level system that requires users to do a lot of housekeeping. See: -* https://wiki.apache.org/hadoop/ZooKeeper/FAQ +* https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ The Curator [Framework](framework.md) is designed to hide as much of the details/tedium of this housekeeping as is possible. @@ -26,7 +26,7 @@ Curator exposes several listenable interfaces for clients to monitor the state o | State Change | Description [...] |--| [...] | CONNECTED| Sent for the first successful connection to the server. NOTE: You will only get one of these messages for any CuratorFramework instance. [...] -| READONLY | The connection has gone into read-only mode. This can only happen if you pass true for CuratorFrameworkFactory.Builder.canBeReadOnly(). See the ZooKeeper doc regarding read only connections: https://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode. The connection will remain in read only mode until another state change is sent. [...] +| READONLY | The connection has gone into read-only mode. This can only happen if you pass true for CuratorFrameworkFactory.Builder.canBeReadOnly(). See the ZooKeeper doc regarding read only connections: https://cwiki.apache.org/confluence/display/HADOOP2/ZooKeeper+GSoCReadOnlyMode. The connection will remain in read only mode until another state change is sent. [...] | SUSPENDED| There has been a loss of connection. Leaders, locks, etc. should suspend until the connection is re-established. [...] | RECONNECTED | A suspended or lost connection has been re-established. [...] | LOST | Curator will set the LOST state when it believes that the ZooKeeper session has expired. ZooKeeper connections have a session. When the session expires, clients must take appropriate action. In Curator, this is complicated by the fact that Curator internally manages the ZooKeeper connection. Curator will set the LOST state when any of the following occurs: a) ZooKeeper returns
[curator-site] 01/05: style: align code blocks
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit 51cd05b822d82544ea48bc33b393b1061cb8e76d Author: tison AuthorDate: Tue Aug 15 16:22:09 2023 +0800 style: align code blocks Signed-off-by: tison --- docs/recipes-distributed-delay-queue.md| 10 +- docs/recipes-distributed-priority-queue.md | 12 ++-- docs/recipes-distributed-queue.md | 10 +- docs/recipes-persistent-ttl-node.md| 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/recipes-distributed-delay-queue.md b/docs/recipes-distributed-delay-queue.md index 1e67a7a..c9fca67 100644 --- a/docs/recipes-distributed-delay-queue.md +++ b/docs/recipes-distributed-delay-queue.md @@ -24,17 +24,17 @@ An implementation of a Distributed Delay Queue. A Delay Queue is similar to a Pr ## Creating a DistributedDelayQueue ```java +// Parameters: +// client - the curator client +// consumer - message consumer +// serializer - serializer to use for items +// queuePath - path to store queue public static QueueBuilder builder( CuratorFramework client, QueueConsumer consumer, QueueSerializer serializer, java.lang.String queuePath ); -// Parameters: -// client - the curator client -// consumer - message consumer -// serializer - serializer to use for items -// queuePath - path to store queue ``` ```java diff --git a/docs/recipes-distributed-priority-queue.md b/docs/recipes-distributed-priority-queue.md index 3eaf53f..da2b4a8 100644 --- a/docs/recipes-distributed-priority-queue.md +++ b/docs/recipes-distributed-priority-queue.md @@ -24,17 +24,17 @@ An implementation of the Distributed Priority Queue ZK recipe. ## Creating a DistributedPriorityQueue ```java +// Parameters: +// client - the curator client +// consumer - message consumer +// serializer - serializer to use for items +// queuePath - path to store queue public static QueueBuilder builder( CuratorFramework client, QueueConsumer consumer, QueueSerializer serializer, java.lang.String queuePath ); -// Parameters: -// client - the curator client -// consumer - message consumer -// serializer - serializer to use for items -// queuePath - path to store queue ``` ```java @@ -44,9 +44,9 @@ DistributedPriorityQueue queue = builder.buildPriorityQueue(minItem ``` ```java -public DistributedPriorityQueue buildPriorityQueue(int minItemsBeforeRefresh); // Parameters: // minItemsBeforeRefresh - minimum items to process before refreshing the item list +public DistributedPriorityQueue buildPriorityQueue(int minItemsBeforeRefresh); ``` Build a DistributedPriorityQueue from the current builder values. diff --git a/docs/recipes-distributed-queue.md b/docs/recipes-distributed-queue.md index 01d8ab0..61f857a 100644 --- a/docs/recipes-distributed-queue.md +++ b/docs/recipes-distributed-queue.md @@ -24,17 +24,17 @@ An implementation of the Distributed Queue ZK recipe. Items put into the queue a ### Creating a DistributedQueue ```java +// Parameters: +// client - the curator client +// consumer - functor to receive messages +// serializer - serializer to use for items +// queuePath - path to store queue public static QueueBuilder builder( CuratorFramework client, QueueConsumer consumer, QueueSerializer serializer, java.lang.String queuePath ); -// Parameters: -// client - the curator client -// consumer - functor to receive messages -// serializer - serializer to use for items -// queuePath - path to store queue ``` ```java diff --git a/docs/recipes-persistent-ttl-node.md b/docs/recipes-persistent-ttl-node.md index 9371036..f01813e 100644 --- a/docs/recipes-persistent-ttl-node.md +++ b/docs/recipes-persistent-ttl-node.md @@ -15,7 +15,7 @@ PersistentTtlNode is useful when you need to create a TTL node but don't want to ## Creating a PersistentTtlNode -``` +```java // Parameters: // client - client instance // path path for the parent ZNode
[curator-site] 04/05: style: more align code blocks
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit 125608fbeb019e872a188a4bd43a558a8c5aea4f Author: tison AuthorDate: Tue Aug 15 16:28:41 2023 +0800 style: more align code blocks Signed-off-by: tison --- docs/async-details.md| 1 - docs/recipes-curator-cache.md| 2 +- docs/recipes-path-cache.md | 2 +- docs/recipes-shared-counter.md | 6 +++--- docs/recipes-shared-semaphore.md | 2 +- docs/service-discovery.md| 2 +- docs/utilities.md| 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/async-details.md b/docs/async-details.md index 085d9e9..13f037a 100644 --- a/docs/async-details.md +++ b/docs/async-details.md @@ -124,7 +124,6 @@ async.create() .getData() .forPath(actualPath) .thenApply(() -> watchTriggered())); - ``` ### AsyncStage canonical usage diff --git a/docs/recipes-curator-cache.md b/docs/recipes-curator-cache.md index 2faf2b9..c4255c8 100644 --- a/docs/recipes-curator-cache.md +++ b/docs/recipes-curator-cache.md @@ -27,7 +27,7 @@ A utility that attempts to keep the data from a node locally cached. Optionally // client - the client // path - path to watch // options - empty or one or more options -CuratorCache.build(CuratorFramework client, String path, Options... options); +CuratorCache build(CuratorFramework client, String path, Options... options); ``` There is a builder factory available for additional options when building the cache instance. See `CuratorCacheBuilder` for details. diff --git a/docs/recipes-path-cache.md b/docs/recipes-path-cache.md index 074decf..75d55d9 100644 --- a/docs/recipes-path-cache.md +++ b/docs/recipes-path-cache.md @@ -17,7 +17,7 @@ A Path Cache is used to watch a ZNode. Whenever a child is added, updated or rem ## Creating a PathChildrenCache -``` +```java // Parameters: // client - the client // path - path to watch diff --git a/docs/recipes-shared-counter.md b/docs/recipes-shared-counter.md index 7bf8f6e..16e5826 100644 --- a/docs/recipes-shared-counter.md +++ b/docs/recipes-shared-counter.md @@ -43,17 +43,17 @@ count.close(); int getCount(); ``` -``` +```java // Add a listener for changes to the count void addListener(SharedCountListener listener); ``` -``` +```java // Change the shared count value irrespective of its previous state public void setCount(int newCount); ``` -``` +```java // Changes the shared count only if its value has not changed since this client last read it. If the count // has changed, the value is not set and this client's view of the value is updated. i.e. if the count is // not successful you can get the updated value by calling getCount(). diff --git a/docs/recipes-shared-semaphore.md b/docs/recipes-shared-semaphore.md index b782fcc..347d282 100644 --- a/docs/recipes-shared-semaphore.md +++ b/docs/recipes-shared-semaphore.md @@ -52,7 +52,7 @@ To acquire one lease/usage, use one of the acquire methods: ```java // Acquire a lease. If no leases are available, this method blocks until either the maximum number of -/ leases is increased or another client/process closes a lease. +// leases is increased or another client/process closes a lease. // The client must close the lease when it is done with it. You should do this in a finally block. public Lease acquire(); ``` diff --git a/docs/service-discovery.md b/docs/service-discovery.md index 026cedb..9a655a0 100644 --- a/docs/service-discovery.md +++ b/docs/service-discovery.md @@ -40,9 +40,9 @@ ServiceProviders are allocated by using a `ServiceProviderBuilder`. You obtain a The ServiceProvider must be started by calling `start()`. When finished you should call `close()`. The only method in ServiceProvider is: ```java -public ServiceInstance getInstance() throws Exception; // Return an instance for a single use. IMPORTANT: users should not hold on to the instance // returned. A fresh instance should always be retrieved. +public ServiceInstance getInstance() throws Exception; ``` :::note diff --git a/docs/utilities.md b/docs/utilities.md index 4347e8a..5a5d653 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -41,7 +41,7 @@ CuratorFramework client = CuratorFrameworkFactory.builder() Curator's Locker uses Java 7's try-with-resources feature to making using Curator locks safer: ```java -InterProcessMutex mutex = new InterProcessMutex(...) // or any InterProcessLock +InterProcessMutex mutex = new InterProcessMutex(...); // or any InterProcessLock try (Locker locker = new Locker(mutex, maxTimeout, unit)) { // do work }
[curator-site] 02/05: fix: show sidebar for standalone docs pages
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit 36bbdd02514a23d2a6b09b24743ca10908e28d6a Author: tison AuthorDate: Tue Aug 15 16:23:04 2023 +0800 fix: show sidebar for standalone docs pages Signed-off-by: tison --- docs/modeled-components.md | 4 docs/modeled-typed.md | 4 2 files changed, 8 insertions(+) diff --git a/docs/modeled-components.md b/docs/modeled-components.md index dc56de6..bc7c4f5 100644 --- a/docs/modeled-components.md +++ b/docs/modeled-components.md @@ -1,3 +1,7 @@ +--- +displayed_sidebar: docs +--- + # Modeled Curator - Components Modeled Curator components are intended to allow you to model your ZooKeeper usage early in your application so that the majority of the code that interacts with ZooKeeper doesn't need to be concerned with paths, byte arrays, ACLs, options, etc. The [Pub-Sub Example](https://github.com/apache/curator/tree/master/curator-examples/src/main/java/pubsub) can give you some ideas on how to accomplish this. diff --git a/docs/modeled-typed.md b/docs/modeled-typed.md index 2b5a258..3c0bda5 100644 --- a/docs/modeled-typed.md +++ b/docs/modeled-typed.md @@ -1,3 +1,7 @@ +--- +displayed_sidebar: docs +--- + # Modeled Curator - Caching, Typed Parameters and Versioning In addition to its [main features](modeled-components.md) Modeled Curator also supports integrated caching, typed parameters and versioning.
[curator-site] 03/05: style: more align code blocks
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git commit a6f9d082efd08142bb2ad97f339303e59d1422b2 Author: tison AuthorDate: Tue Aug 15 16:23:56 2023 +0800 style: more align code blocks Signed-off-by: tison --- docs/recipes-shared-reentrant-lock.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/recipes-shared-reentrant-lock.md b/docs/recipes-shared-reentrant-lock.md index 6322023..7917500 100644 --- a/docs/recipes-shared-reentrant-lock.md +++ b/docs/recipes-shared-reentrant-lock.md @@ -26,8 +26,8 @@ public InterProcessMutex(CuratorFramework client, String path); To acquire the lock, use one of the acquire methods: ```java -Acquire the mutex - blocking until it's available. Note: the same thread can call acquire -re-entrantly. Each call to acquire must be balanced by a call to release() +// Acquire the mutex - blocking until it's available. Note: the same thread can call acquire +// re-entrantly. Each call to acquire must be balanced by a call to release() public void acquire(); ```
[curator-site] branch main updated (c17329a -> ed363e7)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git from c17329a initialize new 51cd05b style: align code blocks new 36bbdd0 fix: show sidebar for standalone docs pages new a6f9d08 style: more align code blocks new 125608f style: more align code blocks new ed363e7 fix: broken link to wiki.apache.org The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: docs/async-details.md | 1 - docs/errors.md | 4 ++-- docs/modeled-components.md | 4 docs/modeled-typed.md | 4 docs/recipes-curator-cache.md | 2 +- docs/recipes-distributed-delay-queue.md| 10 +- docs/recipes-distributed-priority-queue.md | 12 ++-- docs/recipes-distributed-queue.md | 10 +- docs/recipes-path-cache.md | 2 +- docs/recipes-persistent-ttl-node.md| 2 +- docs/recipes-shared-counter.md | 6 +++--- docs/recipes-shared-reentrant-lock.md | 4 ++-- docs/recipes-shared-semaphore.md | 2 +- docs/service-discovery.md | 2 +- docs/tech-note-03.md | 2 +- docs/utilities.md | 2 +- 16 files changed, 38 insertions(+), 31 deletions(-)
[curator-site] branch main created (now c17329a)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/curator-site.git at c17329a initialize This branch includes the following new commits: new c17329a initialize The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[curator] branch master updated: hotfix. tidy duplicate license header
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new f0d12dde hotfix. tidy duplicate license header f0d12dde is described below commit f0d12ddee3ccc139eadc4cbe589a4287b5bfeae3 Author: tison AuthorDate: Mon Aug 14 12:12:18 2023 +0800 hotfix. tidy duplicate license header Signed-off-by: tison --- .github/workflows/ci.yml | 2 +- .../framework/recipes/watch/PersistentWatcher.java | 18 -- src/site/resources/css/site.css| 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7806dfd1..0f44bc2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Check license header -run: docker run --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native:v1 check +run: docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 check - name: Cache Local Maven Repository uses: actions/cache@v3 diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/PersistentWatcher.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/PersistentWatcher.java index bf950ced..59a0c6ab 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/PersistentWatcher.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/PersistentWatcher.java @@ -17,24 +17,6 @@ * under the License. */ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ package org.apache.curator.framework.recipes.watch; import com.google.common.base.Preconditions; diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css index 84c4e5dc..9d04020a 100644 --- a/src/site/resources/css/site.css +++ b/src/site/resources/css/site.css @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information
[curator] branch master updated: CURATOR-681: Fix flaky TestInterProcessMutex.testReentrantSingleLock (#470)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 260afcda CURATOR-681: Fix flaky TestInterProcessMutex.testReentrantSingleLock (#470) 260afcda is described below commit 260afcdadbadde87ce7a8c2a904afdc3c1013884 Author: Kezhu Wang AuthorDate: Sun Aug 13 23:49:49 2023 +0800 CURATOR-681: Fix flaky TestInterProcessMutex.testReentrantSingleLock (#470) --- .../curator/framework/recipes/locks/TestInterProcessMutexBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java index 92cf397f..4ea7c7b9 100644 --- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java +++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java @@ -283,8 +283,8 @@ public abstract class TestInterProcessMutexBase extends BaseClassForTests { Thread.sleep(100); } } finally { -mutex.release(); hasLock.set(false); +mutex.release(); } return null; }
[curator] branch master updated: CURATOR-457: Custom service discovery path (#473)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new d14cb464 CURATOR-457: Custom service discovery path (#473) d14cb464 is described below commit d14cb464cbd4e8e0e1bb51daba76e84eb2e346db Author: Kezhu Wang AuthorDate: Sun Aug 13 23:39:17 2023 +0800 CURATOR-457: Custom service discovery path (#473) Signed-off-by: tison Co-authored-by: alexm Co-authored-by: tison --- curator-x-discovery/pom.xml| 6 +++ .../x/discovery/DiscoveryPathConstructor.java | 40 + .../x/discovery/ServiceDiscoveryBuilder.java | 21 +++-- .../details/DiscoveryPathConstructorImpl.java | 48 .../x/discovery/details/ServiceDiscoveryImpl.java | 45 --- .../details/DiscoveryPathConstructorImplTest.java | 52 ++ .../x/discovery/details/TestServiceDiscovery.java | 44 ++ 7 files changed, 237 insertions(+), 19 deletions(-) diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml index c27b648a..229fce2f 100644 --- a/curator-x-discovery/pom.xml +++ b/curator-x-discovery/pom.xml @@ -81,5 +81,11 @@ commons-math test + + +org.assertj +assertj-core +test + diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/DiscoveryPathConstructor.java b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/DiscoveryPathConstructor.java new file mode 100644 index ..3c865dbd --- /dev/null +++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/DiscoveryPathConstructor.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.curator.x.discovery; + +/** + * Constructs ZooKeeper paths to services for service discovering. + */ +public interface DiscoveryPathConstructor { +/** + * Return the parent path where all service names registered. + * + * @return the base path of all services + */ +String getBasePath(); + +/** + * Return the parent path where all instances of the service registered. + * + * @param serviceName service name + * @return path to service instances + */ +String getPathForInstances(String serviceName); +} diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceDiscoveryBuilder.java b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceDiscoveryBuilder.java index a5159a65..c103847e 100644 --- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceDiscoveryBuilder.java +++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceDiscoveryBuilder.java @@ -20,13 +20,14 @@ package org.apache.curator.x.discovery; import org.apache.curator.framework.CuratorFramework; +import org.apache.curator.x.discovery.details.DiscoveryPathConstructorImpl; import org.apache.curator.x.discovery.details.InstanceSerializer; import org.apache.curator.x.discovery.details.JsonInstanceSerializer; import org.apache.curator.x.discovery.details.ServiceDiscoveryImpl; public class ServiceDiscoveryBuilder { private CuratorFramework client; -private String basePath; +private DiscoveryPathConstructor pathConstructor; private InstanceSerializer serializer; private ServiceInstance thisInstance; private Class payloadClass; @@ -53,7 +54,7 @@ public class ServiceDiscoveryBuilder { if (serializer == null) { serializer(new JsonInstanceSerializer(payloadClass)); } -return new ServiceDiscoveryImpl(client, basePath, serializer, thisInstance, watchInstances); +return new ServiceDiscoveryImpl(client, pathConstructor, serializer, thisInstance, watchInstances); } /** @@ -68,13 +69,25 @@ public class ServiceDiscoveryBuilder { } /** - * Required - set the base path to store in ZK + * Required
[curator] branch master updated: CURATOR-41: Suppress secondary exception in LockInternals.attemptLock (#466)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new a4f1ef22 CURATOR-41: Suppress secondary exception in LockInternals.attemptLock (#466) a4f1ef22 is described below commit a4f1ef22fa4395d3188341f04025e723a84c961b Author: Kezhu Wang AuthorDate: Sat Jun 17 21:49:42 2023 +0800 CURATOR-41: Suppress secondary exception in LockInternals.attemptLock (#466) Suppress exception from `deleteOurPath` if we are throwing. --- .../framework/recipes/locks/LockInternals.java | 19 +++ ...inessWithFaults.java => TestLockInternals.java} | 38 -- .../org/apache/curator/test/BaseClassForTests.java | 2 +- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java index a5f30c40..1be6bd13 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java @@ -222,7 +222,6 @@ public class LockInternals { private boolean internalLockLoop(long startMillis, Long millisToWait, String ourPath) throws Exception { boolean haveTheLock = false; -boolean doDelete = false; try { if (revocable.get() != null) { client.getData().usingWatcher(revocableWatcher).forPath(ourPath); @@ -247,7 +246,6 @@ public class LockInternals { millisToWait -= (System.currentTimeMillis() - startMillis); startMillis = System.currentTimeMillis(); if (millisToWait <= 0) { -doDelete = true; // timed out - delete our node break; } @@ -263,16 +261,23 @@ public class LockInternals { } } catch (Exception e) { ThreadUtils.checkInterrupted(e); -doDelete = true; +deleteOurPathQuietly(ourPath, e); throw e; -} finally { -if (doDelete) { -deleteOurPath(ourPath); -} +} +if (!haveTheLock) { +deleteOurPath(ourPath); } return haveTheLock; } +private void deleteOurPathQuietly(String ourPath, Exception ex) { +try { +deleteOurPath(ourPath); +} catch (Exception suppressed) { +ex.addSuppressed(suppressed); +} +} + private void deleteOurPath(String ourPath) throws Exception { try { client.delete().guaranteed().forPath(ourPath); diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockInternals.java similarity index 62% rename from curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java rename to curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockInternals.java index d1f28500..f96a791a 100644 --- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockCleanlinessWithFaults.java +++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestLockInternals.java @@ -30,9 +30,9 @@ import org.apache.curator.test.BaseClassForTests; import org.apache.zookeeper.KeeperException; import org.junit.jupiter.api.Test; -public class TestLockCleanlinessWithFaults extends BaseClassForTests { +public class TestLockInternals extends BaseClassForTests { @Test -public void testNodeDeleted() throws Exception { +public void testNodeDeletedCleanlyWithFaults() throws Exception { final String PATH = "/foo/bar"; CuratorFramework client = null; @@ -62,4 +62,38 @@ public class TestLockCleanlinessWithFaults extends BaseClassForTests { TestCleanState.closeAndTestClean(client); } } + +@Test +public void testAttemptLockFailedException() throws Exception { +final String PATH = "/foo/bar"; +try (CuratorFramework client = CuratorFrameworkFactory.builder() +.connectString(server.getConnectString()) +.connectionTimeoutMs(1000) +.retryPolicy(new RetryNTimes(0, 0)) +.build()) { +client.start(); + +client.create().creatingParentsIfNeeded().forPath(PATH); +assertEquals(client.checkExists().forPath(PATH).getNumChildren(), 0); + +Loc
[curator] branch master updated: CURATOR-672. Ensure JDK 17 support (#461)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 1e82d0c1 CURATOR-672. Ensure JDK 17 support (#461) 1e82d0c1 is described below commit 1e82d0c1d0708d84d06e5757e435d1d9dbebfb48 Author: tison AuthorDate: Mon May 8 08:52:25 2023 +0800 CURATOR-672. Ensure JDK 17 support (#461) Signed-off-by: tison --- .github/workflows/ci.yml | 2 +- .mvn/wrapper/maven-wrapper.properties | 5 +- .../java/org/apache/curator/TestEnsurePath.java| 2 +- .../framework/imps/GzipCompressionProvider.java| 17 +- .../imps/TestGzipCompressionProvider.java | 17 +- .../framework/imps/TestWatcherIdentity.java| 2 +- .../server/contexts/GenericDiscoveryContext.java | 4 +- mvnw | 177 - mvnw.cmd | 24 ++- pom.xml| 16 +- 10 files changed, 166 insertions(+), 100 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62fc4bdf..e7678802 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: -java: [8, 11] +java: [8, 11, 17] env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} steps: diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 7b027d35..d8b2495a 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,6 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java b/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java index 39e1601c..dffc7b63 100644 --- a/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java +++ b/curator-client/src/test/java/org/apache/curator/TestEnsurePath.java @@ -20,7 +20,7 @@ package org.apache.curator; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Matchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/GzipCompressionProvider.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/GzipCompressionProvider.java index 8e59b6bb..91362831 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/GzipCompressionProvider.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/GzipCompressionProvider.java @@ -46,6 +46,19 @@ public class GzipCompressionProvider implements CompressionProvider /** GZIP header magic number. */ private static final int GZIP_MAGIC = 0x8b1f; +// The value of the OS bit has changed in JDK 16; +// see https://bugs.openjdk.org/browse/JDK-8244706 for details. +private static final byte OS_BIT; +static { +final String version = System.getProperty("java.specification.version"); +if (version.contains(".")) { +// before or equal to 1.8 +OS_BIT = 0; +} else { +OS_BIT = (Float.parseFloat(version) >= 16 ? (byte) -1 : 0); +} +} + /** See {@code java.util.zip.GZIPOutputStream.writeHeader()} */ private static final byte[] GZIP_HEADER = new byte[] { (byte) GZIP_MAGIC,// Magic number (byte 0) @@ -57,7 +70,7 @@ public class GzipCompressionProvider implements CompressionProvider 0,// Modification time MTIME (byte 2) 0,// Modification time MTIME (byte 3) 0,// Extra flags (XFLG) -0 // Operating system (OS) +OS_BIT// Operating system (OS) }; /** GZip flags, {@link #GZIP_HEADER}'s 4th byte */ @@ -85,7 +98,7 @@ public class GzipCompressionProvider implements CompressionProvider
[curator] branch master updated: CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server (#459)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 447878f4 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server (#459) 447878f4 is described below commit 447878f43b86a272b73a0732e88180c93d59ca1c Author: tison AuthorDate: Sat May 6 11:09:52 2023 +0800 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server (#459) Signed-off-by: tison --- .github/workflows/ci.yml | 2 ++ .gitignore | 4 +++ .mvn/extensions.xml| 34 ++ .mvn/gradle-enterprise-custom-user-data.groovy | 38 .mvn/gradle-enterprise.xml | 50 ++ 5 files changed, 128 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 905ce9ca..62fc4bdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,8 @@ jobs: fail-fast: false matrix: java: [8, 11] +env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} steps: - uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index b6b15f2b..e263d972 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,7 @@ atlassian-ide-plugin.xml # NetBeans specific files/directories .nbattrs + +# Gradle Enterprise +test-reports/ +.mvn/.gradle-enterprise/ diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index ..2fa9d8d6 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,34 @@ + + +http://maven.apache.org/EXTENSIONS/1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; +xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd;> + +com.gradle +gradle-enterprise-maven-extension +1.17 + + +com.gradle +common-custom-user-data-maven-extension +1.11.1 + + diff --git a/.mvn/gradle-enterprise-custom-user-data.groovy b/.mvn/gradle-enterprise-custom-user-data.groovy new file mode 100644 index ..c7ffb79f --- /dev/null +++ b/.mvn/gradle-enterprise-custom-user-data.groovy @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +if (System.env.GITHUB_ACTIONS) { +if (session.goals.size() == 1 && session.goals[0] == 'initialize') { +// omit publishing build scan when the only goal is "initialize" +buildScan.publishOnDemand() +} else { +def jobName = System.env.GITHUB_JOB +buildScan.value('GitHub Actions Job name', jobName) +buildScan.value('GitHub Actions Event name', System.env.GITHUB_EVENT_NAME) +buildScan.value('GitHub Ref name', System.env.GITHUB_REF_NAME) +buildScan.value('GitHub Actor', System.env.GITHUB_ACTOR) +buildScan.link('GitHub Repository', "https://github.com/; + System.env.GITHUB_REPOSITORY) +buildScan.link('GitHub Commit', "https://github.com/; + System.env.GITHUB_REPOSITORY + "/commits/" + System.env.GITHUB_SHA) +buildScan.buildScanPublished { publishedBuildScan -> +new File(System.env.GITHUB_STEP_SUMMARY).withWriterAppend { out -> +out.println("\n[Gradle build scan for ${jobName}](${publishedBuildScan.buildScanUri})\n") +} +} +} +} diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml new file mode 100644 index ..86d14f7a --- /dev/null +++ b/.mvn/gradle-enterprise.xml @@ -0,0 +1,50 @@ + + +https://www.gradle.com/gradle-enterprise-maven; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; +xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd;> + +https://ge.apache.org +false + + + +true +true +true + +
[curator] branch CURATOR-669 deleted (was 4e3113b5)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-669 in repository https://gitbox.apache.org/repos/asf/curator.git was 4e3113b5 drop maybe-private maven command The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[curator] branch CURATOR-669 updated (a298df5c -> 4e3113b5)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-669 in repository https://gitbox.apache.org/repos/asf/curator.git from a298df5c Apply suggestions add 4e3113b5 drop maybe-private maven command No new revisions were added by this update. Summary of changes: .mvn/gradle-enterprise-custom-user-data.groovy | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-)
[curator] branch CURATOR-669 updated (a90d4ee4 -> a298df5c)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-669 in repository https://gitbox.apache.org/repos/asf/curator.git from a90d4ee4 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server add a298df5c Apply suggestions No new revisions were added by this update. Summary of changes: .github/workflows/ci.yml | 13 ++--- .gitignore | 1 - .mvn/{ge-extensions.xml => extensions.xml} | 2 +- .mvn/gradle-enterprise.xml | 1 + 4 files changed, 4 insertions(+), 13 deletions(-) rename .mvn/{ge-extensions.xml => extensions.xml} (97%)
[curator] branch CURATOR-669 created (now a90d4ee4)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch CURATOR-669 in repository https://gitbox.apache.org/repos/asf/curator.git at a90d4ee4 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server This branch includes the following new commits: new a90d4ee4 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[curator] 01/01: CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch CURATOR-669 in repository https://gitbox.apache.org/repos/asf/curator.git commit a90d4ee430ea4dd9d9d4dc3ded5c82565e75e25b Author: tison AuthorDate: Wed Apr 12 23:07:56 2023 +0800 CURATOR-669. Integrate with ge.apache.org Gradle Enterprise server Signed-off-by: tison --- .github/workflows/ci.yml | 11 ++ .gitignore | 5 +++ .mvn/ge-extensions.xml | 34 ++ .mvn/gradle-enterprise-custom-user-data.groovy | 46 .mvn/gradle-enterprise.xml | 49 ++ 5 files changed, 145 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 905ce9ca..fed0b3de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Configure Gradle Enterprise integration +run: | + if [[ -n "${{ secrets.GE_ACCESS_TOKEN }}" ]]; then +echo "Configuring Gradle Enterprise for build" +cp .mvn/ge-extensions.xml .mvn/extensions.xml +echo "GRADLE_ENTERPRISE_ACCESS_KEY=${{ secrets.GE_ACCESS_TOKEN }}" >> $GITHUB_ENV +echo "GRADLE_ENTERPRISE_ACCESS_KEY has been configured" + else +echo "GRADLE_ENTERPRISE_ACCESS_KEY is not configured." + fi + - name: Cache Local Maven Repository uses: actions/cache@v3 with: diff --git a/.gitignore b/.gitignore index b6b15f2b..d7569d41 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,8 @@ atlassian-ide-plugin.xml # NetBeans specific files/directories .nbattrs + +# Gradle Enterprise +test-reports/ +.mvn/.gradle-enterprise/ +.mvn/extensions.xml diff --git a/.mvn/ge-extensions.xml b/.mvn/ge-extensions.xml new file mode 100644 index ..04a32a79 --- /dev/null +++ b/.mvn/ge-extensions.xml @@ -0,0 +1,34 @@ + + +http://maven.apache.org/EXTENSIONS/1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; +xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd;> + +com.gradle +gradle-enterprise-maven-extension +1.16.3 + + +com.gradle +common-custom-user-data-maven-extension +1.11.1 + + diff --git a/.mvn/gradle-enterprise-custom-user-data.groovy b/.mvn/gradle-enterprise-custom-user-data.groovy new file mode 100644 index ..393a2c01 --- /dev/null +++ b/.mvn/gradle-enterprise-custom-user-data.groovy @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Add Maven command line arguments +def mavenCommand = '' + +if (System.env.MAVEN_CMD_LINE_ARGS) { +mavenCommand = "mvn ${System.env.MAVEN_CMD_LINE_ARGS}".toString() +buildScan.value('Maven command line', mavenCommand) +} + +if (System.env.GITHUB_ACTIONS) { +if (session.goals.size() == 1 && session.goals[0] == 'initialize') { +// omit publishing build scan when the only goal is "initialize" +buildScan.publishOnDemand() +} else { +def jobName = System.env.GITHUB_JOB +buildScan.value('GitHub Actions Job name', jobName) +buildScan.value('GitHub Actions Event name', System.env.GITHUB_EVENT_NAME) +buildScan.value('GitHub Ref name', System.env.GITHUB_REF_NAME) +buildScan.value('GitHub Actor', System.env.GITHUB_ACTOR) +buildScan.link('GitHub Repository', "https://github.com/; + System.env.GITHUB_REPOSITORY) +buildScan.link('GitHub Commit', "https://github.com/; + System.env.GITHUB_REPOSITORY + "/commits/" + System.env.GITHUB_SHA) +buildScan.buildScanPublished { publishedBuildScan -> +new File(System.env.GITHUB_STEP_SUMMARY).withWriterAppend { out -> +out.println("\n[Gradle build scan for '${mavenCommand}' in ${jobName}](${publishedBuildScan.buildScanUr
[curator] branch master updated (0095a273 -> a72fe517)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/curator.git from 0095a273 CURATOR-668. Modify blockUntilConnected method annotation (#457) new 684e8731 Disable fail-fast to avoid heavy rerun new a72fe517 Disable force required to allow push release commits The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .asf.yaml| 7 +-- .github/workflows/ci.yml | 5 +++-- 2 files changed, 4 insertions(+), 8 deletions(-)
[curator] 01/02: Disable fail-fast to avoid heavy rerun
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit 684e873166b2f6ae677c14e25c55590adab09a28 Author: tison AuthorDate: Wed Apr 12 21:16:03 2023 +0800 Disable fail-fast to avoid heavy rerun Signed-off-by: tison --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06f80891..905ce9ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,9 @@ name: CI on: push: +branches: [master] pull_request: -branches: - - master +branches: [master] env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 @@ -39,6 +39,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 120 strategy: + fail-fast: false matrix: java: [8, 11] steps:
[curator] 02/02: Disable force required to allow push release commits
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit a72fe5173881fa399546a459b2946a749568112b Author: tison AuthorDate: Wed Apr 12 21:18:23 2023 +0800 Disable force required to allow push release commits Since we do not use release branch pattern, we need this commit otherwise the process is not working. Signed-off-by: tison --- .asf.yaml | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 54e12d52..953d24ef 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -33,12 +33,7 @@ github: merge: false rebase: true protected_branches: -master: - required_status_checks: -strict: false -contexts: - - Required - required_signatures: false +master: {} notifications: commits: commits@curator.apache.org
[curator] branch master updated: CURATOR-668. Modify blockUntilConnected method annotation (#457)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 0095a273 CURATOR-668. Modify blockUntilConnected method annotation (#457) 0095a273 is described below commit 0095a273c157a74b133c5d9cc6ee9b61ecb43fd4 Author: Adam's <43720485+cscsyiku...@users.noreply.github.com> AuthorDate: Wed Apr 12 19:22:36 2023 +0800 CURATOR-668. Modify blockUntilConnected method annotation (#457) Co-authored-by: tison --- .../main/java/org/apache/curator/framework/CuratorFramework.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index 1527500e..bbcd3cfc 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -290,7 +290,10 @@ public interface CuratorFramework extends Closeable /** * Block until a connection to ZooKeeper is available or the maxWaitTime has been exceeded - * @param maxWaitTime The maximum wait time. Specify a value = 0 to return immediately + * @param maxWaitTime The maximum wait time. + *1. {@code value <= 0} and {@code units != null} to return immediately; + *2. {@code value <= 0} and {@code units == null} to wait indefinitely, + *which is same as {@link #blockUntilConnected()}. * @param units The time units for the maximum wait time. * @return True if connection has been established, false otherwise. * @throws InterruptedException If interrupted while waiting @@ -299,7 +302,7 @@ public interface CuratorFramework extends Closeable /** * Block until a connection to ZooKeeper is available. This method will not return until a - * connection is available or it is interrupted, in which case an InterruptedException will + * connection is available, or it is interrupted, in which case an InterruptedException will * be thrown * @throws InterruptedException If interrupted while waiting */
[curator] branch master updated: CURATOR-609. ModeledCache should not deserialize empty ZNodes on deletion (#396)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new e4ad57e3 CURATOR-609. ModeledCache should not deserialize empty ZNodes on deletion (#396) e4ad57e3 is described below commit e4ad57e3600ccb5473544b7577584e25c780944f Author: Ryan Ruel AuthorDate: Tue Apr 11 22:24:31 2023 -0400 CURATOR-609. ModeledCache should not deserialize empty ZNodes on deletion (#396) Co-authored-by: Ryan Ruel --- .../x/async/modeled/details/ModeledCacheImpl.java | 15 +++- .../async/modeled/TestCachedModeledFramework.java | 93 ++ 2 files changed, 105 insertions(+), 3 deletions(-) diff --git a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java index b2f28fab..7bef5e37 100644 --- a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java +++ b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java @@ -189,9 +189,18 @@ class ModeledCacheImpl implements TreeCacheListener, ModeledCache { ZPath path = ZPath.parse(event.getData().getPath()); Entry entry = entries.remove(path); -T model = (entry != null) ? entry.model : serializer.deserialize(event.getData().getData()); -Stat stat = (entry != null) ? entry.stat : event.getData().getStat(); -accept(ModeledCacheListener.Type.NODE_REMOVED, path, stat, model); +T model = null; +if (entry != null) { +model = entry.model; +} +else if (event.getData().getData() != null) { +model = serializer.deserialize(event.getData().getData()); +} +if (model != null) { +Stat stat = (entry != null) ? entry.stat : event.getData().getStat(); +accept(ModeledCacheListener.Type.NODE_REMOVED, path, stat, model); +} + break; } diff --git a/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestCachedModeledFramework.java b/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestCachedModeledFramework.java index e310f5d4..692417d0 100644 --- a/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestCachedModeledFramework.java +++ b/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestCachedModeledFramework.java @@ -24,6 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; + import com.google.common.collect.Sets; import org.apache.curator.framework.state.ConnectionState; import org.apache.curator.test.Timing; @@ -31,6 +32,7 @@ import org.apache.curator.test.compatibility.CuratorTestBase; import org.apache.curator.x.async.modeled.cached.CachedModeledFramework; import org.apache.curator.x.async.modeled.cached.ModeledCacheListener; import org.apache.curator.x.async.modeled.models.TestModel; +import org.apache.zookeeper.data.Stat; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @@ -42,6 +44,8 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Semaphore; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -181,6 +185,95 @@ public class TestCachedModeledFramework extends TestModeledFrameworkBase } } +// Verify the CachedModeledFramework does not attempt to deserialize empty ZNodes on deletion using the Jackson +// model serializer. +// See: CURATOR-609 +@Test +public void testEmptyNodeJacksonDeserialization() +{ +final TestModel model = new TestModel("a", "b", "c", 20, BigInteger.ONE); +verifyEmptyNodeDeserialization(model, modelSpec); +} + +// Verify the CachedModeledFramework does not attempt to deserialize empty ZNodes on deletion using the raw +// model serializer. +// See: CURATOR-609 +@Test +public void testEmptyNodeRawDeserialization() +{ +final byte[] byteModel = {0x01, 0x02, 0x03}; +final ModelSpec byteModelSpec = ModelSpec.builder(path, ModelSerializer.raw).build(); +verifyEmptyNodeDeserialization(byteModel, byteModelSpec); +} + +private void verifyEmptyNodeDeserialization(T model, ModelSpec parentModelSpec) +{ +// The sub-path is
[curator] branch master updated: Fix type "JMV" to "JVM" in LeaderLatch (#456)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new caccd293 Fix type "JMV" to "JVM" in LeaderLatch (#456) caccd293 is described below commit caccd293b60c14768509c55d3975f0936cb0a4fe Author: David Copley AuthorDate: Wed Apr 12 12:21:07 2023 +1000 Fix type "JMV" to "JVM" in LeaderLatch (#456) --- .../java/org/apache/curator/framework/recipes/leader/LeaderLatch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java index 800cfec9..26193a04 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java @@ -55,7 +55,7 @@ import org.apache.curator.utils.PathUtils; /** * - * Abstraction to select a "leader" amongst multiple contenders in a group of JMVs connected to + * Abstraction to select a "leader" amongst multiple contenders in a group of JVMs connected to * a Zookeeper cluster. If a group of N thread/processes contend for leadership one will * randomly be assigned leader until it releases leadership at which time another one from the * group will randomly be chosen
[curator] branch master updated: CURATOR-665: Convey mkdirs exception to create backgorund (#453)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new d1b64d63 CURATOR-665: Convey mkdirs exception to create backgorund (#453) d1b64d63 is described below commit d1b64d63d9772495e22154260b1c2634432cd436 Author: tison AuthorDate: Mon Apr 3 16:22:39 2023 +0800 CURATOR-665: Convey mkdirs exception to create backgorund (#453) Signed-off-by: tison --- .../java/org/apache/curator/utils/ZKPaths.java | 8 +-- .../curator/framework/imps/CreateBuilderImpl.java | 40 --- .../x/async/modeled/TestModeledFramework.java | 78 -- 3 files changed, 107 insertions(+), 19 deletions(-) diff --git a/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java b/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java index 0e762573..9ac88e16 100644 --- a/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java +++ b/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java @@ -21,6 +21,8 @@ package org.apache.curator.utils; import com.google.common.base.Splitter; import com.google.common.collect.Lists; +import java.util.Collections; +import java.util.List; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooDefs; @@ -28,8 +30,6 @@ import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.ACL; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Collections; -import java.util.List; public class ZKPaths { @@ -228,7 +228,7 @@ public class ZKPaths /** * Extracts the ten-digit suffix from a sequential znode path. Does not currently perform validation on the * provided path; it will just return a string comprising the last ten characters. - * + * * @param path the path of a sequential znodes * @return the sequential suffix */ @@ -350,7 +350,7 @@ public class ZKPaths } zookeeper.create(subPath, new byte[0], acl, getCreateMode(asContainers)); } -catch ( KeeperException.NodeExistsException e ) +catch (KeeperException.NodeExistsException ignore) { // ignore... someone else has created it since we checked } diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java index adca0160..6b52e662 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java @@ -22,9 +22,32 @@ package org.apache.curator.framework.imps; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicBoolean; import org.apache.curator.RetryLoop; import org.apache.curator.drivers.OperationTrace; -import org.apache.curator.framework.api.*; +import org.apache.curator.framework.api.ACLBackgroundPathAndBytesable; +import org.apache.curator.framework.api.ACLCreateModeBackgroundPathAndBytesable; +import org.apache.curator.framework.api.ACLCreateModePathAndBytesable; +import org.apache.curator.framework.api.ACLCreateModeStatBackgroundPathAndBytesable; +import org.apache.curator.framework.api.ACLPathAndBytesable; +import org.apache.curator.framework.api.BackgroundCallback; +import org.apache.curator.framework.api.BackgroundPathAndBytesable; +import org.apache.curator.framework.api.CreateBackgroundModeACLable; +import org.apache.curator.framework.api.CreateBackgroundModeStatACLable; +import org.apache.curator.framework.api.CreateBuilder; +import org.apache.curator.framework.api.CreateBuilder2; +import org.apache.curator.framework.api.CreateBuilderMain; +import org.apache.curator.framework.api.CreateProtectACLCreateModePathAndBytesable; +import org.apache.curator.framework.api.CuratorEvent; +import org.apache.curator.framework.api.CuratorEventType; +import org.apache.curator.framework.api.ErrorListenerPathAndBytesable; +import org.apache.curator.framework.api.PathAndBytesable; +import org.apache.curator.framework.api.ProtectACLCreateModePathAndBytesable; +import org.apache.curator.framework.api.ProtectACLCreateModeStatPathAndBytesable; +import org.apache.curator.framework.api.UnhandledErrorListener; import org.apache.curator.framework.api.transaction.OperationType; import org.apache.curator.framework.api.transaction.TransactionCreateBuilder; import
[curator] branch master updated: CURATOR-621: Fix write acquire after downgrade InterProcessReadWriteLock (#445)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 2c283bd9 CURATOR-621: Fix write acquire after downgrade InterProcessReadWriteLock (#445) 2c283bd9 is described below commit 2c283bd97fbc50ce592231dcf846ece4190b7948 Author: Kezhu Wang AuthorDate: Sat Apr 1 22:54:54 2023 +0800 CURATOR-621: Fix write acquire after downgrade InterProcessReadWriteLock (#445) Currently, in downgrading the write lock of InterProcessReadWriteLock, the read lock could have a larger sorting sequence than the contending write-acquire; this cause the contending write-acquire to succeed after downgrading. This commit solves this by using the write lock's sorting sequence for read lock in downgrading. --- .../recipes/locks/InterProcessReadWriteLock.java | 21 +-- .../recipes/locks/StandardLockInternalsDriver.java | 15 +++- .../locks/TestInterProcessReadWriteLock.java | 43 ++ 3 files changed, 66 insertions(+), 13 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java index 53718eb5..b0a8e178 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java @@ -114,17 +114,7 @@ public class InterProcessReadWriteLock { public WriteLock(CuratorFramework client, String basePath, byte[] lockData) { -super(client, basePath, WRITE_LOCK_NAME, lockData, 1, new SortingLockInternalsDriver() { -@Override -public PredicateResults getsTheLock( -CuratorFramework client, -List children, -String sequenceNodeName, -int maxLeases -) throws Exception { -return super.getsTheLock(client, children, sequenceNodeName, maxLeases); -} -}); +super(client, basePath, WRITE_LOCK_NAME, lockData, 1, new SortingLockInternalsDriver()); } @Override @@ -138,6 +128,15 @@ public class InterProcessReadWriteLock public ReadLock(CuratorFramework client, String basePath, byte[] lockData, WriteLock writeLock) { super(client, basePath, READ_LOCK_NAME, lockData, Integer.MAX_VALUE, new SortingLockInternalsDriver() { +@Override +protected String getSortingSequence() { +String writePath = writeLock.getLockPath(); +if (writePath != null) { +return fixForSorting(writePath, WRITE_LOCK_NAME); +} +return null; +} + @Override public PredicateResults getsTheLock( CuratorFramework client, diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/StandardLockInternalsDriver.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/StandardLockInternalsDriver.java index 2d785b92..b9e5d52a 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/StandardLockInternalsDriver.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/StandardLockInternalsDriver.java @@ -42,17 +42,28 @@ public class StandardLockInternalsDriver implements LockInternalsDriver return new PredicateResults(pathToWatch, getsTheLock); } +protected String getSortingSequence() { +return null; +} + @Override public String createsTheLock(CuratorFramework client, String path, byte[] lockNodeBytes) throws Exception { + +CreateMode createMode = CreateMode.EPHEMERAL_SEQUENTIAL; +String sequence = getSortingSequence(); +if (sequence != null) { +path += sequence; +createMode = CreateMode.EPHEMERAL; +} String ourPath; if ( lockNodeBytes != null ) { -ourPath = client.create().creatingParentContainersIfNeeded().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL).forPath(path, lockNodeBytes); +ourPath = client.create().creatingParentContainersIfNeeded().withProtection().withMode(createMode).forPath(path, lockNodeBytes); } else { -ourPath = client.create().creatingParentContainersIfNeeded().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL).forPath(path); +ourPath = client.create().creatingParentContainersIfNeeded
[curator] 01/02: CURATOR-661: Use license header checker and add required status
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit 89df142a0509c5371f49ba80fd55157483daf75b Author: tison AuthorDate: Mon Mar 13 13:52:01 2023 +0800 CURATOR-661: Use license header checker and add required status Signed-off-by: tison --- .asf.yaml| 46 +++ .github/workflows/ci.yml | 39 +++-- licenserc.toml | 25 + pom.xml | 56 ++-- 4 files changed, 96 insertions(+), 70 deletions(-) diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index ..54e12d52 --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,46 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +github: + description: "Apache Curator" + homepage: https://curator.apache.org/ + labels: +- java +- database +- curator +- zookeeper +- consensus + features: +wiki: false +issues: false +projects: false + enabled_merge_buttons: +squash: true +merge: false +rebase: true + protected_branches: +master: + required_status_checks: +strict: false +contexts: + - Required + required_signatures: false + +notifications: + commits: commits@curator.apache.org + pullrequests: commits@curator.apache.org + jira_options: link label diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e131fed8..06f80891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,28 +30,17 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - name: Checkout -uses: actions/checkout@v3 - - - name: Set up JDK 11 -uses: actions/setup-java@v3 -with: - java-version: 11 - distribution: 'temurin' - - - name: RAT check -run: ./mvnw apache-rat:check + - uses: actions/checkout@v3 + - name: Check license header +run: docker run --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native:v1 check - test: + unittest: name: Unit tests runs-on: ubuntu-latest timeout-minutes: 120 strategy: matrix: -java: -- '8' -- '11' - +java: [8, 11] steps: - uses: actions/checkout@v3 @@ -74,3 +63,21 @@ jobs: - name: Test with ${{ matrix.java }} run: ./mvnw verify + + required: +name: Required +runs-on: ubuntu-latest +if: ${{ always() }} +needs: + - check + - unittest +steps: + - name: Guardian +run: | + if [[ ! ( \ + "${{ needs.check.result }}" == "success" \ + && "${{ needs.unittest.result }}" == "success" \ + ) ]]; then +echo "Required jobs haven't been completed successfully." +exit -1 + fi diff --git a/licenserc.toml b/licenserc.toml new file mode 100644 index ..09593513 --- /dev/null +++ b/licenserc.toml @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +headerPath = "Apache-2.0-ASF.txt" + +excludes = [ +"DEPENDENCIES", +"doap.rdf", +"**/NOTICE", +"**/*.conf
[curator] branch master updated (34432073 -> 79edb0e2)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/curator.git from 34432073 CURATOR-518: Fix LeaderSelector requeue broken by interruptLeadership (#446) new 89df142a CURATOR-661: Use license header checker and add required status new 79edb0e2 CURATOR-661: Apply license header reformat The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../test/resources/log4j.properties => .asf.yaml | 37 + .github/workflows/ci.yml | 39 -- curator-client/pom.xml | 7 ++- .../java/org/apache/curator/ConnectionState.java | 3 +- .../curator/CuratorConnectionLossException.java| 3 +- .../org/apache/curator/CuratorZookeeperClient.java | 2 +- .../main/java/org/apache/curator/HandleHolder.java | 3 +- .../src/main/java/org/apache/curator/Helper.java | 3 +- .../main/java/org/apache/curator/RetryLoop.java| 3 +- .../java/org/apache/curator/RetryLoopImpl.java | 2 +- .../main/java/org/apache/curator/RetryPolicy.java | 3 +- .../main/java/org/apache/curator/RetrySleeper.java | 3 +- .../org/apache/curator/SessionFailRetryLoop.java | 3 +- .../apache/curator/SessionFailedRetryPolicy.java | 3 +- .../main/java/org/apache/curator/TimeTrace.java| 3 +- .../curator/connection/ThreadLocalRetryLoop.java | 3 +- .../curator/drivers/AdvancedTracerDriver.java | 3 +- .../org/apache/curator/drivers/EventTrace.java | 3 +- .../org/apache/curator/drivers/OperationTrace.java | 3 +- .../org/apache/curator/drivers/TracerDriver.java | 3 +- .../apache/curator/ensemble/EnsembleProvider.java | 3 +- .../ensemble/fixed/FixedEnsembleProvider.java | 3 +- .../retry/BoundedExponentialBackoffRetry.java | 3 +- .../curator/retry/ExponentialBackoffRetry.java | 3 +- .../org/apache/curator/retry/RetryForever.java | 3 +- .../java/org/apache/curator/retry/RetryNTimes.java | 3 +- .../org/apache/curator/retry/RetryOneTime.java | 3 +- .../apache/curator/retry/RetryUntilElapsed.java| 3 +- .../org/apache/curator/retry/SleepingRetry.java| 3 +- .../curator/utils/CloseableExecutorService.java| 2 +- .../utils/CloseableScheduledExecutorService.java | 2 +- .../org/apache/curator/utils/CloseableUtils.java | 2 +- .../org/apache/curator/utils/Compatibility.java| 2 +- .../utils/ConfigurableZookeeperFactory.java| 2 +- .../java/org/apache/curator/utils/DebugUtils.java | 2 +- .../apache/curator/utils/DefaultTracerDriver.java | 3 +- .../curator/utils/DefaultZookeeperFactory.java | 3 +- .../java/org/apache/curator/utils/EnsurePath.java | 2 +- .../apache/curator/utils/ExceptionAccumulator.java | 3 +- .../apache/curator/utils/InternalACLProvider.java | 2 +- .../curator/utils/NonAdminZookeeperFactory.java| 3 +- .../java/org/apache/curator/utils/PathUtils.java | 3 +- .../java/org/apache/curator/utils/ThreadUtils.java | 3 +- .../java/org/apache/curator/utils/ZKPaths.java | 2 +- .../org/apache/curator/utils/ZookeeperFactory.java | 3 +- .../test/java/org/apache/curator/BasicTests.java | 3 +- .../java/org/apache/curator/TestEnsurePath.java| 3 +- .../src/test/java/org/apache/curator/TestIs37.java | 3 +- .../java/org/apache/curator/TestRetryLoop.java | 3 +- .../apache/curator/TestSessionFailRetryLoop.java | 3 +- .../utils/TestCloseableExecutorService.java| 2 +- .../TestCloseableScheduledExecutorService.java | 3 +- .../java/org/apache/curator/utils/TestZKPaths.java | 2 +- curator-client/src/test/resources/log4j.properties | 2 - curator-examples/pom.xml | 4 +- .../src/main/java/async/AsyncExamples.java | 3 +- .../src/main/java/cache/CuratorCacheExample.java | 2 +- .../src/main/java/cache/PathCacheExample.java | 3 +- .../src/main/java/cache/TreeCacheExample.java | 3 +- .../src/main/java/discovery/DiscoveryExample.java | 3 +- .../src/main/java/discovery/ExampleServer.java | 3 +- .../src/main/java/discovery/InstanceDetails.java | 3 +- .../main/java/framework/CreateClientExamples.java | 3 +- .../src/main/java/framework/CrudExamples.java | 3 +- .../main/java/framework/TransactionExamples.java | 3 +- .../src/main/java/leader/ExampleClient.java| 3 +- .../main/java/leader/LeaderSelectorExample.java| 3 +- .../main/java/locking/ExampleClientThatLocks.java | 3 +- .../src/main/java/locking/FakeLimitedResource.java | 3 +- .../src/main/java/locking/LockingExample.java | 3 +- .../src/main/java/modeled/ContainerType.java | 3 +- .../main/java/modeled/Mode
[curator] branch master updated: CURATOR-518: Fix LeaderSelector requeue broken by interruptLeadership (#446)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 34432073 CURATOR-518: Fix LeaderSelector requeue broken by interruptLeadership (#446) 34432073 is described below commit 34432073079012fe1d45ab5ff6c15607d95b43d8 Author: Kezhu Wang AuthorDate: Mon Mar 13 13:41:17 2023 +0800 CURATOR-518: Fix LeaderSelector requeue broken by interruptLeadership (#446) --- .../framework/recipes/leader/LeaderSelector.java | 78 ++ .../recipes/leader/LeaderSelectorListener.java | 12 +++- .../recipes/leader/TestLeaderSelector.java | 52 ++- 3 files changed, 112 insertions(+), 30 deletions(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java index 4a331763..4d00c4ce 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java @@ -72,7 +72,10 @@ public class LeaderSelector implements Closeable private final InterProcessMutex mutex; private final AtomicReference state = new AtomicReference(State.LATENT); private final AtomicBoolean autoRequeue = new AtomicBoolean(false); -private final AtomicReference> ourTask = new AtomicReference>(null); + +// guarded by synchronization +private Future ourTask = null; +private Thread ourThread = null; private volatile boolean hasLeadership; private volatile String id = ""; @@ -88,9 +91,6 @@ public class LeaderSelector implements Closeable CLOSED } -// guarded by synchronization -private boolean isQueued = false; - private static final ThreadFactory defaultThreadFactory = ThreadUtils.newThreadFactory("LeaderSelector"); /** @@ -224,6 +224,10 @@ public class LeaderSelector implements Closeable * happens and false is returned. If the instance was not queued, it is re-queued and true * is returned * + * The attempt will finish after session error, leadership release. This method is inherently + * hard to use as there is no public API to guarantee successful requeue. Try {@link #autoRequeue()} + * if you are in doubt. + * * @return true if re-queue is successful */ public boolean requeue() @@ -234,30 +238,25 @@ public class LeaderSelector implements Closeable private synchronized boolean internalRequeue() { -if ( !isQueued && (state.get() == State.STARTED) ) +if ( ourTask == null && (state.get() == State.STARTED) ) { -isQueued = true; -Future task = executorService.submit(new Callable() +ourTask = executorService.submit(new Callable() { @Override public Void call() throws Exception { try { +taskStarted(); doWorkLoop(); } finally { -clearIsQueued(); -if ( autoRequeue.get() ) -{ -internalRequeue(); -} +taskDone(); } return null; } }); -ourTask.set(task); return true; } @@ -273,7 +272,7 @@ public class LeaderSelector implements Closeable client.getConnectionStateListenable().removeListener(listener); executorService.close(); -ourTask.set(null); +ourTask = null; } /** @@ -374,15 +373,39 @@ public class LeaderSelector implements Closeable return hasLeadership; } +private synchronized void taskStarted() { +ourThread = Thread.currentThread(); +} + +private synchronized void taskDone() { +ourTask = null; +ourThread = null; +if (autoRequeue.get()) { +internalRequeue(); +} +} + +/** + * Cancel ongoing election regardless of leadership. + */ +private synchronized void cancelElection() { +// Correctness with requeue: +// * Cancel, taskStarted and taskDone are guarded by synchronized(this). +// * If ourThread is null, new task will observe this cancellation after taskStarted. +// * If ourThread is not null, old task will be cancelled and new task will observe +// this cancellation. +if (ourThread != null) { +ourThread.interrupt(); +} +
[curator] branch master updated: CURATOR-600: ModeledFramework.delete should use DeleteOptions (#449)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 5e22c96e CURATOR-600: ModeledFramework.delete should use DeleteOptions (#449) 5e22c96e is described below commit 5e22c96e94a1a47695af474ee6d11e6d5274fd49 Author: Kezhu Wang AuthorDate: Fri Mar 10 20:15:55 2023 +0800 CURATOR-600: ModeledFramework.delete should use DeleteOptions (#449) --- .../modeled/details/ModeledFrameworkImpl.java | 2 +- .../x/async/CompletableBaseClassForTests.java | 15 ++ .../x/async/modeled/TestModeledFramework.java | 35 ++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledFrameworkImpl.java b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledFrameworkImpl.java index 99568ac4..82f2ad5c 100644 --- a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledFrameworkImpl.java +++ b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledFrameworkImpl.java @@ -231,7 +231,7 @@ public class ModeledFrameworkImpl implements ModeledFramework @Override public AsyncStage delete(int version) { -return dslClient.delete().withVersion(version).forPath(modelSpec.path().fullPath()); +return dslClient.delete().withOptionsAndVersion(modelSpec.deleteOptions(), version).forPath(modelSpec.path().fullPath()); } @Override diff --git a/curator-x-async/src/test/java/org/apache/curator/x/async/CompletableBaseClassForTests.java b/curator-x-async/src/test/java/org/apache/curator/x/async/CompletableBaseClassForTests.java index 1b587fb6..074eb2d5 100644 --- a/curator-x-async/src/test/java/org/apache/curator/x/async/CompletableBaseClassForTests.java +++ b/curator-x-async/src/test/java/org/apache/curator/x/async/CompletableBaseClassForTests.java @@ -18,6 +18,7 @@ */ package org.apache.curator.x.async; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.fail; import com.google.common.base.Throwables; import org.apache.curator.test.BaseClassForTests; @@ -32,6 +33,20 @@ public abstract class CompletableBaseClassForTests extends BaseClassForTests { protected static final Timing2 timing = new Timing2(); +protected void joinThrowable(CompletionStage stage) throws Throwable { +try { +stage.toCompletableFuture().get(); +} catch (Exception ex) { +throw Throwables.getRootCause(ex); +} +} + +protected void exceptional(CompletionStage stage, Class throwable) { +assertThrows(throwable, () -> { +joinThrowable(stage); +}); +} + protected void complete(CompletionStage stage) { complete(stage, (v, e) -> { diff --git a/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestModeledFramework.java b/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestModeledFramework.java index 6daca592..dea41b7f 100644 --- a/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestModeledFramework.java +++ b/curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestModeledFramework.java @@ -33,6 +33,7 @@ import org.apache.curator.framework.schema.SchemaViolation; import org.apache.curator.retry.RetryOneTime; import org.apache.curator.x.async.AsyncCuratorFramework; import org.apache.curator.x.async.AsyncStage; +import org.apache.curator.x.async.api.DeleteOption; import org.apache.curator.x.async.modeled.models.TestModel; import org.apache.curator.x.async.modeled.models.TestNewerModel; import org.apache.curator.x.async.modeled.versioned.Versioned; @@ -106,6 +107,40 @@ public class TestModeledFramework extends TestModeledFrameworkBase complete(client.children(), (children, e) -> assertEquals(Sets.newHashSet(children), expected)); } +@Test +public void testDelete() +{ +ModeledFramework client = ModeledFramework.wrap(async, modelSpec); +complete(client.set(new TestModel())); + +Stat stat = new Stat(); +client.child("a").set(new TestModel(), stat); +exceptional(client.child("a").delete(stat.getVersion() + 1), KeeperException.BadVersionException.class); +complete(client.child("a").delete(stat.getVersion())); + +client.child("b").set(new TestModel()); +complete(client.child("b").delete(-1)); + +client.child("c").set(new TestModel()); + +exceptional(client.delete(), KeeperException.NotEmptyException.class); + +ModelSpec deleteChildren = ModelSpec +.builder(modelSpec.path(), modelSpec.ser
[curator] branch master updated: CURATOR-661: Add Maven wrapper (#450)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 385d6017 CURATOR-661: Add Maven wrapper (#450) 385d6017 is described below commit 385d6017d5857e16ba10bfcb5b4fc0fe58fa3447 Author: tison AuthorDate: Fri Mar 10 09:51:37 2023 +0800 CURATOR-661: Add Maven wrapper (#450) Signed-off-by: tison --- .github/workflows/{ci-unit.yaml => ci.yml} | 25 ++- .mvn/wrapper/maven-wrapper.properties | 19 ++ README.md | 2 +- mvnw | 287 + mvnw.cmd | 187 +++ pom.xml| 45 - src/etc/header.txt | 16 -- 7 files changed, 505 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ci-unit.yaml b/.github/workflows/ci.yml similarity index 84% rename from .github/workflows/ci-unit.yaml rename to .github/workflows/ci.yml index 789fc0b5..e131fed8 100644 --- a/.github/workflows/ci-unit.yaml +++ b/.github/workflows/ci.yml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information @@ -15,7 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# name: CI on: @@ -28,23 +26,23 @@ env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 jobs: - rat: -name: RAT reports + check: +name: Check runs-on: ubuntu-latest steps: - name: Checkout -uses: actions/checkout@v2 +uses: actions/checkout@v3 - name: Set up JDK 11 -uses: actions/setup-java@v2 +uses: actions/setup-java@v3 with: java-version: 11 distribution: 'temurin' - name: RAT check -run: mvn -B apache-rat:check +run: ./mvnw apache-rat:check - check: + test: name: Unit tests runs-on: ubuntu-latest timeout-minutes: 120 @@ -55,11 +53,10 @@ jobs: - '11' steps: - - name: Checkout -uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Cache Local Maven Repository -uses: actions/cache@v2 +uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -67,13 +64,13 @@ jobs: ${{ runner.os }}-maven- - name: Set up JDK ${{ matrix.java }} -uses: actions/setup-java@v2 +uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} distribution: 'temurin' - name: Build with ${{ matrix.java }} -run: mvn -B clean install -DskipTests +run: ./mvnw clean install -DskipTests - name: Test with ${{ matrix.java }} -run: mvn -B verify +run: ./mvnw verify diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index ..7b027d35 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/README.md b/README.md index 3fec3514..f62ce2ef 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ under the License. [![Twitter](https://img.shields.io/badge/Follow-@Curator-55acee?logo=Twitter=55acee)](https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2Fapache%2Fcurator_src=twsrc%5Etfw=follow_link_name=ApacheCurator_p=followbutton) -## What's is Apache Curator? +##
[curator] branch master updated: [CURATOR-661] Update copyright year in NOTICE files (#447)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new ff4d9ff3 [CURATOR-661] Update copyright year in NOTICE files (#447) ff4d9ff3 is described below commit ff4d9ff361e0baf50554e2d8198ee624f7ec29ee Author: tison AuthorDate: Sat Mar 4 15:19:45 2023 +0800 [CURATOR-661] Update copyright year in NOTICE files (#447) Signed-off-by: tison --- NOTICE| 2 +- curator-client/NOTICE | 2 +- curator-examples/NOTICE | 2 +- curator-framework/NOTICE | 2 +- curator-recipes/NOTICE| 2 +- curator-test/NOTICE | 2 +- curator-x-discovery-server/NOTICE | 2 +- curator-x-discovery/NOTICE| 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NOTICE b/NOTICE index e1f07d16..0222626a 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-client/NOTICE b/curator-client/NOTICE index e1f07d16..0222626a 100644 --- a/curator-client/NOTICE +++ b/curator-client/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-examples/NOTICE b/curator-examples/NOTICE index e1f07d16..0222626a 100644 --- a/curator-examples/NOTICE +++ b/curator-examples/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-framework/NOTICE b/curator-framework/NOTICE index e1f07d16..0222626a 100644 --- a/curator-framework/NOTICE +++ b/curator-framework/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-recipes/NOTICE b/curator-recipes/NOTICE index e1f07d16..0222626a 100644 --- a/curator-recipes/NOTICE +++ b/curator-recipes/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-test/NOTICE b/curator-test/NOTICE index e1f07d16..0222626a 100644 --- a/curator-test/NOTICE +++ b/curator-test/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-x-discovery-server/NOTICE b/curator-x-discovery-server/NOTICE index e1f07d16..0222626a 100644 --- a/curator-x-discovery-server/NOTICE +++ b/curator-x-discovery-server/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/curator-x-discovery/NOTICE b/curator-x-discovery/NOTICE index e1f07d16..0222626a 100644 --- a/curator-x-discovery/NOTICE +++ b/curator-x-discovery/NOTICE @@ -1,5 +1,5 @@ Apache Curator -Copyright 2013-2014 The Apache Software Foundation +Copyright 2013-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/).
[curator] 01/02: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit a69b3f141c5397354adf9ef128d6991781d1c9dd Author: tison AuthorDate: Wed Nov 2 18:25:53 2022 +0800 [maven-release-plugin] prepare for next development iteration Signed-off-by: tison --- curator-client/pom.xml | 4 ++-- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 4 ++-- curator-recipes/pom.xml| 4 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 2 +- curator-test/pom.xml | 4 ++-- curator-x-async/pom.xml| 2 +- curator-x-discovery-server/pom.xml | 4 ++-- curator-x-discovery/pom.xml| 4 ++-- pom.xml| 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 333eb22c..3577c0f8 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -23,11 +23,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-client -5.4.0 +5.5.0-SNAPSHOT bundle Curator Client diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml index 4495ad05..bf349b3d 100644 --- a/curator-examples/pom.xml +++ b/curator-examples/pom.xml @@ -24,7 +24,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-examples diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml index 5338cca4..f0cefbd0 100644 --- a/curator-framework/pom.xml +++ b/curator-framework/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-framework -5.4.0 +5.5.0-SNAPSHOT bundle Curator Framework diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index 5797b69e..4aa7dbb1 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-recipes -5.4.0 +5.5.0-SNAPSHOT bundle Curator Recipes diff --git a/curator-test-zk35/pom.xml b/curator-test-zk35/pom.xml index acaca3aa..d0f9b7e6 100644 --- a/curator-test-zk35/pom.xml +++ b/curator-test-zk35/pom.xml @@ -20,7 +20,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-test-zk36/pom.xml b/curator-test-zk36/pom.xml index 387f44ee..2b293728 100644 --- a/curator-test-zk36/pom.xml +++ b/curator-test-zk36/pom.xml @@ -20,7 +20,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-test/pom.xml b/curator-test/pom.xml index 701e3aac..4417b2b5 100644 --- a/curator-test/pom.xml +++ b/curator-test/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-test -5.4.0 +5.5.0-SNAPSHOT Curator Testing Unit testing utilities. diff --git a/curator-x-async/pom.xml b/curator-x-async/pom.xml index 18b6ee85..184e909c 100644 --- a/curator-x-async/pom.xml +++ b/curator-x-async/pom.xml @@ -22,7 +22,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml index 1dd37a75..a4af5d3f 100644 --- a/curator-x-discovery-server/pom.xml +++ b/curator-x-discovery-server/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-x-discovery-server -5.4.0 +5.5.0-SNAPSHOT bundle Curator Service Discovery Server diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml index 93963239..39dbf10e 100644 --- a/curator-x-discovery/pom.xml +++ b/curator-x-discovery/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-x-discovery -5.4.0 +5.5.0-SNAPSHOT bundle Curator Service Discovery diff --git a/pom.xml b/pom.xml index 255aa53d..b9171f93 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT pom Apache Curator
[curator] 02/02: Set currentStableVersion to 5.4.0
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git commit 1a4149f1edbc93ee98ad8915c61fabf84ed5a4d2 Author: tison AuthorDate: Wed Nov 2 18:26:37 2022 +0800 Set currentStableVersion to 5.4.0 Signed-off-by: tison --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b9171f93..9e96d2c2 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 1.8 false -5.3.0 +5.4.0 UTF-8 UTF-8
[curator] branch master updated (9b3a1453 -> 1a4149f1)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/curator.git from 9b3a1453 [CURATOR-653] Proposed changes based on PR #398 (#436) add 526e38c7 [maven-release-plugin] prepare release apache-curator-5.4.0 new a69b3f14 [maven-release-plugin] prepare for next development iteration new 1a4149f1 Set currentStableVersion to 5.4.0 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: curator-client/pom.xml | 4 ++-- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 4 ++-- curator-recipes/pom.xml| 4 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 2 +- curator-test/pom.xml | 4 ++-- curator-x-async/pom.xml| 2 +- curator-x-discovery-server/pom.xml | 4 ++-- curator-x-discovery/pom.xml| 4 ++-- pom.xml| 6 +++--- 11 files changed, 19 insertions(+), 19 deletions(-)
svn commit: r1905022 - in /curator/site/trunk: ./ apidocs/ apidocs/async/ apidocs/async/class-use/ apidocs/cache/ apidocs/cache/class-use/ apidocs/discovery/ apidocs/discovery/class-use/ apidocs/frame
Author: tison Date: Wed Nov 2 14:35:10 2022 New Revision: 1905022 URL: http://svn.apache.org/viewvc?rev=1905022=rev Log: Update for Curator version 5.4.0 [This commit notification would consist of 1014 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
svn commit: r1905021 - in /curator/site/trunk: ./ apidocs/ apidocs/async/ apidocs/async/class-use/ apidocs/cache/ apidocs/cache/class-use/ apidocs/discovery/ apidocs/discovery/class-use/ apidocs/frame
Author: tison Date: Wed Nov 2 13:56:51 2022 New Revision: 1905021 URL: http://svn.apache.org/viewvc?rev=1905021=rev Log: Update for Curator version 5.4.0 [This commit notification would consist of 1195 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
[curator] 01/02: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator.git commit a69b3f141c5397354adf9ef128d6991781d1c9dd Author: tison AuthorDate: Wed Nov 2 18:25:53 2022 +0800 [maven-release-plugin] prepare for next development iteration Signed-off-by: tison --- curator-client/pom.xml | 4 ++-- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 4 ++-- curator-recipes/pom.xml| 4 ++-- curator-test-zk35/pom.xml | 2 +- curator-test-zk36/pom.xml | 2 +- curator-test/pom.xml | 4 ++-- curator-x-async/pom.xml| 2 +- curator-x-discovery-server/pom.xml | 4 ++-- curator-x-discovery/pom.xml| 4 ++-- pom.xml| 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 333eb22c..3577c0f8 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -23,11 +23,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-client -5.4.0 +5.5.0-SNAPSHOT bundle Curator Client diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml index 4495ad05..bf349b3d 100644 --- a/curator-examples/pom.xml +++ b/curator-examples/pom.xml @@ -24,7 +24,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-examples diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml index 5338cca4..f0cefbd0 100644 --- a/curator-framework/pom.xml +++ b/curator-framework/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-framework -5.4.0 +5.5.0-SNAPSHOT bundle Curator Framework diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index 5797b69e..4aa7dbb1 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-recipes -5.4.0 +5.5.0-SNAPSHOT bundle Curator Recipes diff --git a/curator-test-zk35/pom.xml b/curator-test-zk35/pom.xml index acaca3aa..d0f9b7e6 100644 --- a/curator-test-zk35/pom.xml +++ b/curator-test-zk35/pom.xml @@ -20,7 +20,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-test-zk36/pom.xml b/curator-test-zk36/pom.xml index 387f44ee..2b293728 100644 --- a/curator-test-zk36/pom.xml +++ b/curator-test-zk36/pom.xml @@ -20,7 +20,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-test/pom.xml b/curator-test/pom.xml index 701e3aac..4417b2b5 100644 --- a/curator-test/pom.xml +++ b/curator-test/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-test -5.4.0 +5.5.0-SNAPSHOT Curator Testing Unit testing utilities. diff --git a/curator-x-async/pom.xml b/curator-x-async/pom.xml index 18b6ee85..184e909c 100644 --- a/curator-x-async/pom.xml +++ b/curator-x-async/pom.xml @@ -22,7 +22,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT 4.0.0 diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml index 1dd37a75..a4af5d3f 100644 --- a/curator-x-discovery-server/pom.xml +++ b/curator-x-discovery-server/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-x-discovery-server -5.4.0 +5.5.0-SNAPSHOT bundle Curator Service Discovery Server diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml index 93963239..39dbf10e 100644 --- a/curator-x-discovery/pom.xml +++ b/curator-x-discovery/pom.xml @@ -24,11 +24,11 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT curator-x-discovery -5.4.0 +5.5.0-SNAPSHOT bundle Curator Service Discovery diff --git a/pom.xml b/pom.xml index 255aa53d..b9171f93 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.apache.curator apache-curator -5.4.0 +5.5.0-SNAPSHOT pom Apache Curator
[curator] branch main created (now 1a4149f1)
This is an automated email from the ASF dual-hosted git repository. tison pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/curator.git at 1a4149f1 Set currentStableVersion to 5.4.0 This branch includes the following new commits: new a69b3f14 [maven-release-plugin] prepare for next development iteration new 1a4149f1 Set currentStableVersion to 5.4.0 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[curator] 02/02: Set currentStableVersion to 5.4.0
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/curator.git commit 1a4149f1edbc93ee98ad8915c61fabf84ed5a4d2 Author: tison AuthorDate: Wed Nov 2 18:26:37 2022 +0800 Set currentStableVersion to 5.4.0 Signed-off-by: tison --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b9171f93..9e96d2c2 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 1.8 false -5.3.0 +5.4.0 UTF-8 UTF-8
[curator] branch master updated: [CURATOR-653] Proposed changes based on PR #398 (#436)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 9b3a1453 [CURATOR-653] Proposed changes based on PR #398 (#436) 9b3a1453 is described below commit 9b3a145372d9a8bc9a71adb630a1ad9b71fd2889 Author: Matthias Pohl AuthorDate: Tue Oct 18 12:08:03 2022 +0200 [CURATOR-653] Proposed changes based on PR #398 (#436) Co-authored-by: shixiaoxiao Co-authored-by: tison --- .../framework/recipes/leader/LeaderLatch.java | 9 +- .../framework/recipes/leader/TestLeaderLatch.java | 151 + 2 files changed, 159 insertions(+), 1 deletion(-) diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java index e8187cec..553e5070 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java @@ -540,10 +540,17 @@ public class LeaderLatch implements Closeable @VisibleForTesting volatile CountDownLatch debugResetWaitLatch = null; +@VisibleForTesting +volatile CountDownLatch debugResetWaitBeforeNodeDeleteLatch = null; + @VisibleForTesting void reset() throws Exception { setLeadership(false); +if ( debugResetWaitBeforeNodeDeleteLatch != null ) +{ +debugResetWaitBeforeNodeDeleteLatch.await(); +} setNode(null); BackgroundCallback callback = new BackgroundCallback() @@ -623,6 +630,7 @@ public class LeaderLatch implements Closeable } else { +setLeadership(false); String watchPath = sortedChildren.get(ourIndex - 1); Watcher watcher = new Watcher() { @@ -726,7 +734,6 @@ public class LeaderLatch implements Closeable private synchronized void setLeadership(boolean newValue) { boolean oldValue = hasLeadership.getAndSet(newValue); - if ( oldValue && !newValue ) { // Lost leadership, was true, now false listeners.forEach(LeaderLatchListener::notLeader); diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java index 671e3c4b..69deb207 100644 --- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java +++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java @@ -29,7 +29,11 @@ import com.google.common.base.Throwables; import com.google.common.collect.Lists; import com.google.common.collect.Queues; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import java.io.Closeable; import java.time.Duration; +import java.util.ArrayList; +import java.util.Objects; +import java.util.concurrent.ForkJoinPool; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.imps.TestCleanState; @@ -220,6 +224,153 @@ public class TestLeaderLatch extends BaseClassForTests } } +@Test +public void testResettingOfLeadershipAfterConcurrentLeadershipChange() throws Exception +{ +final String latchPath = "/test"; +final Timing2 timing = new Timing2(); +final BlockingQueue events = Queues.newLinkedBlockingQueue(); + +final List closeableResources = new ArrayList<>(); +try +{ +final String id0 = "id0"; +final CuratorFramework client0 = createAndStartClient(server.getConnectString(), timing, id0, events); +closeableResources.add(client0); +final LeaderLatch latch0 = createAndStartLeaderLatch(client0, latchPath, id0, events); +closeableResources.add(latch0); + +assertEquals(new TestEvent(id0, TestEventType.GAINED_CONNECTION), events.poll(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS)); +assertEquals(new TestEvent(id0, TestEventType.GAINED_LEADERSHIP), events.poll(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS)); + +final String id1 = "id1"; +final CuratorFramework client1 = createAndStartClient(server.getConnectString(), timing, id1, events); +closeableResources.add(client1); +final LeaderLatch latch1 = createAndStartLeaderLatch(client1, latchPath, id1, events); +closeableResources.add(latch1); + +assertEquals(new TestEvent(id1, TestEventType.GAINED_CONNECTION), events.poll(timing.forWai
[curator] branch master updated: CURATOR-644. CURATOR-645. Fix livelock in LeaderLatch (#430)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 4b96f18b CURATOR-644. CURATOR-645. Fix livelock in LeaderLatch (#430) 4b96f18b is described below commit 4b96f18b311485d006f65c1462d2cdd0b5838c84 Author: tison AuthorDate: Tue Sep 27 11:01:28 2022 +0800 CURATOR-644. CURATOR-645. Fix livelock in LeaderLatch (#430) Signed-off-by: tison Co-authored-by: Matthias Pohl --- curator-recipes/pom.xml| 6 ++ .../framework/recipes/leader/LeaderLatch.java | 38 +++-- .../framework/recipes/leader/TestLeaderLatch.java | 64 +- curator-test-zk35/pom.xml | 6 ++ 4 files changed, 107 insertions(+), 7 deletions(-) diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index d27d7fa3..b84a9489 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -86,6 +86,12 @@ commons-math test + + +org.awaitility +awaitility +test + diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java index 5d1c249b..e8187cec 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java @@ -190,6 +190,12 @@ public class LeaderLatch implements Closeable close(closeMode); } +@VisibleForTesting +void closeOnDemand() throws IOException +{ +internalClose(closeMode, false); +} + /** * Remove this instance from the leadership election. If this instance is the leader, leadership * is released. IMPORTANT: the only way to release leadership is by calling close(). All LeaderLatch @@ -198,9 +204,25 @@ public class LeaderLatch implements Closeable * @param closeMode allows the default close mode to be overridden at the time the latch is closed. * @throws IOException errors */ -public synchronized void close(CloseMode closeMode) throws IOException +public void close(CloseMode closeMode) throws IOException { -Preconditions.checkState(state.compareAndSet(State.STARTED, State.CLOSED), "Already closed or has not been started"); +internalClose(closeMode, true); +} + +private synchronized void internalClose(CloseMode closeMode, boolean failOnClosed) throws IOException +{ +if (!state.compareAndSet(State.STARTED, State.CLOSED)) +{ +if (failOnClosed) +{ +throw new IllegalStateException("Already closed or has not been started"); +} +else +{ +return; +} +} + Preconditions.checkNotNull(closeMode, "closeMode cannot be null"); cancelStartTask(); @@ -586,6 +608,9 @@ public class LeaderLatch implements Closeable final String localOurPath = ourPath.get(); List sortedChildren = LockInternals.getSortedChildren(LOCK_NAME, sorter, children); int ourIndex = (localOurPath != null) ? sortedChildren.indexOf(ZKPaths.getNodeFromPath(localOurPath)) : -1; + +log.debug("checkLeadership with id: {}, ourPath: {}, children: {}", id, localOurPath, sortedChildren); + if ( ourIndex < 0 ) { log.error("Can't find our node. Resetting. Index: " + ourIndex); @@ -604,7 +629,7 @@ public class LeaderLatch implements Closeable @Override public void process(WatchedEvent event) { -if ( (state.get() == State.STARTED) && (event.getType() == Event.EventType.NodeDeleted) && (localOurPath != null) ) +if ( state.get() == State.STARTED && event.getType() == Event.EventType.NodeDeleted ) { try { @@ -626,8 +651,8 @@ public class LeaderLatch implements Closeable { if ( event.getResultCode() == KeeperException.Code.NONODE.intValue() ) { -// previous node is gone - reset -reset(); +// previous node is gone - retry getChildren +getChildren(); } } }; @@ -669,7 +694,7 @@ public class LeaderLatch implements Closeable { if ( client.getConnectionStateErrorPolicy().isErrorState(ConnectionState.SUSPENDED) ||
[curator] branch master updated: Introduce AssertJ for assertions
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new e70ef671 Introduce AssertJ for assertions e70ef671 is described below commit e70ef67105e41d589d5f855cf6d4013434122c34 Author: tison AuthorDate: Tue Aug 30 14:01:34 2022 +0800 Introduce AssertJ for assertions AssertJ's assertions generate fruitful messages when there're failures. Signed-off-by: tison --- curator-client/pom.xml | 5 + curator-client/src/test/java/org/apache/curator/TestRetryLoop.java | 3 ++- pom.xml| 7 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 245c91eb..f0da5e98 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -87,6 +87,11 @@ awaitility test + +org.assertj +assertj-core +test + diff --git a/curator-client/src/test/java/org/apache/curator/TestRetryLoop.java b/curator-client/src/test/java/org/apache/curator/TestRetryLoop.java index 0471a75f..abdc82e2 100644 --- a/curator-client/src/test/java/org/apache/curator/TestRetryLoop.java +++ b/curator-client/src/test/java/org/apache/curator/TestRetryLoop.java @@ -18,6 +18,7 @@ */ package org.apache.curator; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -108,7 +109,7 @@ public class TestRetryLoop extends BaseClassForTests } } -assertTrue(loopCount >= 2); +assertThat(loopCount).isGreaterThanOrEqualTo(2); } finally { diff --git a/pom.xml b/pom.xml index 58fdc51c..5d176b7b 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,7 @@ 2.2 1.9.13 2.10.0 +3.23.1 1.19.4 @@ -382,6 +383,12 @@ 1.9.5 + +org.assertj +assertj-core +${assertj-version} + + org.apache.curator curator-client
[curator] branch master updated: CURATOR-538: address from InetSocketAddress could be null as it means unresolved address (#433)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new b66240c8 CURATOR-538: address from InetSocketAddress could be null as it means unresolved address (#433) b66240c8 is described below commit b66240c80e8f289b701e1febfd2f7a3f6aac Author: Sergey Nuyanzin AuthorDate: Tue Aug 30 07:42:19 2022 +0200 CURATOR-538: address from InetSocketAddress could be null as it means unresolved address (#433) --- .../src/main/java/org/apache/curator/utils/Compatibility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-client/src/main/java/org/apache/curator/utils/Compatibility.java b/curator-client/src/main/java/org/apache/curator/utils/Compatibility.java index 7c1406c1..4afc8e5a 100644 --- a/curator-client/src/main/java/org/apache/curator/utils/Compatibility.java +++ b/curator-client/src/main/java/org/apache/curator/utils/Compatibility.java @@ -113,7 +113,7 @@ public class Compatibility log.error("Could not call addrField.get({})", server, e); } } -return (address != null) ? address.getAddress().getHostAddress() : "unknown"; +return (address != null && address.getAddress() != null) ? address.getAddress().getHostAddress() : "unknown"; } public static boolean hasPersistentWatchers()
[curator] branch master updated: CURATOR-648: Fixed CuratorFramework#blockUntilConnected documentation (#432)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 917a98ff CURATOR-648: Fixed CuratorFramework#blockUntilConnected documentation (#432) 917a98ff is described below commit 917a98ff79954dba0180745627c30c73d885b64c Author: João Alves AuthorDate: Mon Jul 25 18:50:16 2022 +0300 CURATOR-648: Fixed CuratorFramework#blockUntilConnected documentation (#432) --- .../src/main/java/org/apache/curator/framework/CuratorFramework.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index 492a4614..7943c61f 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -290,7 +290,7 @@ public interface CuratorFramework extends Closeable /** * Block until a connection to ZooKeeper is available or the maxWaitTime has been exceeded - * @param maxWaitTime The maximum wait time. Specify a value = 0 to wait indefinitely + * @param maxWaitTime The maximum wait time. Specify a value = 0 to return immediately * @param units The time units for the maximum wait time. * @return True if connection has been established, false otherwise. * @throws InterruptedException If interrupted while waiting
[curator] branch master updated: CURATOR-524. Fix all URLs as https (#431)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new d4aa4424 CURATOR-524. Fix all URLs as https (#431) d4aa4424 is described below commit d4aa4424a2b2e3f3c640937d8d539e8c76e2564a Author: tison AuthorDate: Sun Jul 17 16:05:32 2022 +0800 CURATOR-524. Fix all URLs as https (#431) Signed-off-by: tison --- curator-client/pom.xml | 2 +- curator-examples/pom.xml | 2 +- curator-framework/pom.xml | 2 +- curator-recipes/pom.xml| 2 +- curator-test/pom.xml | 2 +- curator-x-discovery-server/pom.xml | 2 +- curator-x-discovery/pom.xml| 2 +- pom.xml| 28 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index a9467ee8..245c91eb 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -17,7 +17,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml index 642def69..d6f9ced3 100644 --- a/curator-examples/pom.xml +++ b/curator-examples/pom.xml @@ -18,7 +18,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml index e9b49082..ebc55a84 100644 --- a/curator-framework/pom.xml +++ b/curator-framework/pom.xml @@ -18,7 +18,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml index 70691102..d27d7fa3 100644 --- a/curator-recipes/pom.xml +++ b/curator-recipes/pom.xml @@ -18,7 +18,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-test/pom.xml b/curator-test/pom.xml index 6df781e7..46bfa988 100644 --- a/curator-test/pom.xml +++ b/curator-test/pom.xml @@ -18,7 +18,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml index f73144a4..45fc290e 100644 --- a/curator-x-discovery-server/pom.xml +++ b/curator-x-discovery-server/pom.xml @@ -18,7 +18,7 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml index 8fdfe2da..e581333a 100644 --- a/curator-x-discovery/pom.xml +++ b/curator-x-discovery/pom.xml @@ -18,7 +18,7 @@
[curator] branch master updated: CURATOR-596. tidy test suite settings
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 5e1f28c4 CURATOR-596. tidy test suite settings 5e1f28c4 is described below commit 5e1f28c4bfdbcf53640a72aac53ff566d359444a Author: tison AuthorDate: Thu Jul 14 13:37:14 2022 +0800 CURATOR-596. tidy test suite settings Signed-off-by: tison --- curator-test-zk35/pom.xml | 2 +- .../java/org/apache/curator/framework/TestCompatibility.java | 3 +++ .../src/test/java/org/apache/curator/zk35/TestIs35.java | 11 ++- .../src/test/java/org/apache/curator/zk36/TestIs36.java | 1 - 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/curator-test-zk35/pom.xml b/curator-test-zk35/pom.xml index 8a023d97..2e22ac82 100644 --- a/curator-test-zk35/pom.xml +++ b/curator-test-zk35/pom.xml @@ -195,7 +195,7 @@ org.apache.curator:curator-recipes zk35TestCompatibility -zk36 +zk36,zk37 diff --git a/curator-test-zk35/src/test/java/org/apache/curator/framework/TestCompatibility.java b/curator-test-zk35/src/test/java/org/apache/curator/framework/TestCompatibility.java index 89f2d292..2a249e08 100644 --- a/curator-test-zk35/src/test/java/org/apache/curator/framework/TestCompatibility.java +++ b/curator-test-zk35/src/test/java/org/apache/curator/framework/TestCompatibility.java @@ -22,11 +22,13 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import org.apache.curator.retry.RetryOneTime; import org.apache.curator.test.compatibility.CuratorTestBase; import org.apache.curator.x.async.AsyncCuratorFramework; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; public class TestCompatibility extends CuratorTestBase { @Test +@Tag(zk35TestCompatibilityGroup) public void testPersistentWatchesNotAvailable() { assertThrows(IllegalStateException.class, ()-> { @@ -38,6 +40,7 @@ public class TestCompatibility extends CuratorTestBase } @Test +@Tag(zk35TestCompatibilityGroup) public void testPersistentWatchesNotAvailableAsync() { assertThrows(IllegalStateException.class, ()->{ diff --git a/curator-test-zk35/src/test/java/org/apache/curator/zk35/TestIs35.java b/curator-test-zk35/src/test/java/org/apache/curator/zk35/TestIs35.java index 53bcf1bb..acc1ab0b 100644 --- a/curator-test-zk35/src/test/java/org/apache/curator/zk35/TestIs35.java +++ b/curator-test-zk35/src/test/java/org/apache/curator/zk35/TestIs35.java @@ -20,17 +20,26 @@ package org.apache.curator.zk35; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.apache.curator.test.compatibility.CuratorTestBase; import org.apache.curator.utils.Compatibility; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -public class TestIs35 +public class TestIs35 extends CuratorTestBase { @Test +@Tag(zk35TestCompatibilityGroup) public void testIsZk35() { assertFalse(Compatibility.hasGetReachableOrOneMethod()); assertTrue(Compatibility.hasAddrField()); assertFalse(Compatibility.hasPersistentWatchers()); } + +@Override +protected void createServer() +{ +// NOP +} } diff --git a/curator-test-zk36/src/test/java/org/apache/curator/zk36/TestIs36.java b/curator-test-zk36/src/test/java/org/apache/curator/zk36/TestIs36.java index 51888c05..f5d062f9 100644 --- a/curator-test-zk36/src/test/java/org/apache/curator/zk36/TestIs36.java +++ b/curator-test-zk36/src/test/java/org/apache/curator/zk36/TestIs36.java @@ -18,7 +18,6 @@ */ package org.apache.curator.zk36; -import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail;
[curator] branch master updated: CURATOR-596. Support ZooKeeper 3.7.1 (#426)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new 8fb978d0 CURATOR-596. Support ZooKeeper 3.7.1 (#426) 8fb978d0 is described below commit 8fb978d0ff4569c80dae19514e8605eca6e80cfc Author: Kezhu Wang AuthorDate: Thu Jul 14 13:34:59 2022 +0800 CURATOR-596. Support ZooKeeper 3.7.1 (#426) Co-authored-by: tison --- curator-client/pom.xml | 11 + .../curator/{TestIs36.java => TestIs37.java} | 24 ++- .../curator/framework/imps/TestReadOnly.java | 13 +- curator-test-zk36/pom.xml | 229 + .../java/org/apache/curator/zk36}/TestIs36.java| 8 +- .../src/test/resources/log4j.properties| 27 +++ .../apache/curator/test/QuorumConfigBuilder.java | 3 + .../test/compatibility/CuratorTestBase.java| 1 + pom.xml| 10 +- 9 files changed, 312 insertions(+), 14 deletions(-) diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 2599650d..a9467ee8 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -121,6 +121,17 @@ + +org.apache.maven.plugins +maven-jar-plugin + + + +test-jar + + + + diff --git a/curator-client/src/test/java/org/apache/curator/TestIs36.java b/curator-client/src/test/java/org/apache/curator/TestIs37.java similarity index 63% copy from curator-client/src/test/java/org/apache/curator/TestIs36.java copy to curator-client/src/test/java/org/apache/curator/TestIs37.java index e7489a31..55c5690c 100644 --- a/curator-client/src/test/java/org/apache/curator/TestIs36.java +++ b/curator-client/src/test/java/org/apache/curator/TestIs37.java @@ -18,22 +18,26 @@ */ package org.apache.curator; -import static org.junit.jupiter.api.Assertions.assertTrue; - import org.apache.curator.test.compatibility.CuratorTestBase; -import org.apache.curator.utils.Compatibility; +import org.apache.zookeeper.ZooKeeper; +import org.apache.zookeeper.proto.WhoAmIResponse; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; -public class TestIs36 extends CuratorTestBase +public class TestIs37 extends CuratorTestBase { +/** + * Ensure that ZooKeeper is 3.7 or above. + * + * It uses reflection to get {@link WhoAmIResponse} which was introduced in 3.7.0. + * + * @see https://issues.apache.org/jira/browse/ZOOKEEPER-3969;>ZOOKEEPER-3969 + */ @Test -@Tag(zk36Group) -public void testIsZk36() -{ -assertTrue(Compatibility.hasGetReachableOrOneMethod()); -assertTrue(Compatibility.hasAddrField()); -assertTrue(Compatibility.hasPersistentWatchers()); +@Tag(zk37Group) +public void testIsZk37() throws Exception { + assertNotNull(Class.forName("org.apache.zookeeper.proto.WhoAmIResponse")); } @Override diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java index 2af98b26..21a9130a 100644 --- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java +++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReadOnly.java @@ -65,17 +65,26 @@ public class TestReadOnly extends BaseClassForTests TestingCluster cluster = createAndStartCluster(3); try { +final CountDownLatch lostLatch = new CountDownLatch(1); client = CuratorFrameworkFactory.newClient(cluster.getConnectString(), timing.session(), timing.connection(), new RetryOneTime(100)); client.start(); client.checkExists().forPath("/"); -client.close(); -client = null; +client.getConnectionStateListenable().addListener(new ConnectionStateListener() { +@Override +public void stateChanged(CuratorFramework client, ConnectionState newState) { +if (newState == ConnectionState.LOST) { +lostLatch.countDown(); +} +} +}); Iterator iterator = cluster.getInstances().iterator(); for ( int i = 0; i < 2; ++i ) { cluster.killServer(iterator.next()); } +timing.awaitLatch(lostLatch); +client.close(); client = Cu
[curator] branch master updated: CURATOR-458. Fix Schema constructor validation (#257)
This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git The following commit(s) were added to refs/heads/master by this push: new c1b6d86a CURATOR-458. Fix Schema constructor validation (#257) c1b6d86a is described below commit c1b6d86a4a7503b2a6dbc825a951a6aabcbb71b1 Author: Roman Leventov AuthorDate: Thu Jul 14 07:01:05 2022 +0400 CURATOR-458. Fix Schema constructor validation (#257) --- .../src/main/java/org/apache/curator/framework/schema/Schema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java b/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java index bcb35d3d..d86fdb5a 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java @@ -105,7 +105,7 @@ public class Schema Schema(String name, Pattern pathRegex, String path, String documentation, SchemaValidator schemaValidator, Allowance ephemeral, Allowance sequential, Allowance watched, boolean canBeDeleted, Map metadata) { -Preconditions.checkNotNull((pathRegex != null) || (path != null), "pathRegex and path cannot both be null"); +Preconditions.checkArgument((pathRegex != null) || (path != null), "pathRegex and path cannot both be null"); this.pathRegex = pathRegex; this.fixedPath = fixPath(path); this.metadata = ImmutableMap.copyOf(Preconditions.checkNotNull(metadata, "metadata cannot be null"));