summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ZOOKEEPER-4466: Support different watch modes on same path (#1859)HEADmasterKezhu Wang2023-05-058-195/+219
| | | | Signed-off-by: Kezhu Wang <kezhuw@gmail.com> Co-authored-by: tison <wander4096@gmail.com>
* ZOOKEEPER-4688: Upgrade `cyclonedx-maven-plugin` to 2.7.6 (#1995)Chris Nauroth2023-04-171-1/+1
| | | | | | | Closes #1995 Signed-off-by: Chris Nauroth <cnauroth@apache.org> Reviewed-by: Christopher Tubbs <ctubbsii@apache.org>
* ZOOKEEPER-4687. Improve SuppressWarnings in KeeperException (#1994)tison2023-04-131-1/+1
| | | Signed-off-by: tison <wander4096@gmail.com>
* ZOOKEEPER-4682. Make FileSnap.deserialize a static method (#1992)tison2023-03-266-19/+13
| | | | | | | FileSnap.deserialize is effectively a static method. Change it to a static method so that we don't need to do some new FileSnap(null) hacks for workaround calling this method. Signed-off-by: tison <wander4096@gmail.com>
* [ZOOKEEPER-4671] Java classpath should contain libs about metrics providers ↵Guoxiong Li2023-03-171-0/+10
| | | | (#1908)
* ZOOKEEPER-3731: Disallow HTTP TRACE method on PrometheusMetrics Server (#1682)doxsch2023-03-082-0/+47
|
* [ZOOKEEPER-4676] ReadOnlyModeTest doesn't not compile on JDK20 ↵Enrico Olivelli2023-03-082-2/+21
| | | | | | (Thread.suspend has been removed) (#1985) * checkstyle
* ZOOKEEPER-4679: Fix CI failure and warning (#1987)tison2023-03-063-19/+22
| | | | | | 1. Run `apt update` before installing C deps to avoid 404. 2. Update actions version to avoid set-output deprecation warnings. Signed-off-by: tison <wander4096@gmail.com>
* [hotfix] Bump actions/checkout to v3 in GitHub Actions workflows (#1938)Scott Brenner2023-03-063-3/+3
|
* ZOOKEEPER-4296: Add null checks to ClientCnxnSocketNetty onClosing (#1697)Colvin Cowie2023-02-272-2/+16
| | | Co-authored-by: Colvin Cowie <COLVINCO@uk.ibm.com>
* [ZOOKEEPER-4677] Cleanup code in the DataTree class (#1968)tison2023-02-271-151/+122
| | | Signed-off-by: tison <wander4096@gmail.com>
* ZOOKEEPER-4636: Fix zkServer.sh for AIXhenk.wiedig@t-systems.com2023-02-251-0/+3
| | | | | | | | | | AIX "echo" does not support "-n" argument. Author: henk.wiedig@t-systems.com <henk.wiedig@t-systems.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, maoling <maoling@apache.org> Closes #1945 from henkwiedig/fix-aix-zkserver
* ZOOKEEPER-4639: Provide auth support for admin server APIs (#1966)li4wang2023-02-2426-121/+1103
| | | Author: Li Wang <liwang@apple.com>
* ZOOKEEPER-4475: Fix NodeChildrenChanged delivered to recursive watcher (#1820)Kezhu Wang2023-02-222-4/+32
| | | | | | | The semantics of persistent recursive watch promise no child events on descendant nodes. When there are standard child watches on descendants of node being watches in persistent recursive mode, server will deliver child events to client inevitably. So we have to filter out child events for persistent recursive watches on client side.
* docs: Minor clarification around globalOutstandingLimit commentsVitaliy2023-02-171-5/+7
| | | | | | | | | | | | This comment better explain how someone with a typical 3-node ensemble may end up with a 500 limit by default. The code that "causes" this is here: https://github.com/apache/zookeeper/blob/cedf09370b88b682ae4f7bcd29c683798fa31928/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java#L166-L170 Author: Vitaliy <vitaliyf@users.noreply.github.com> Reviewers: maoling <maoling@apache.org> Closes #1946 from vitaliyf/docs-globaloutstandinglimit-comments
* [ZOOKEEPER-4647] Tests don't pass on JDK20 because we try to mock ↵Enrico Olivelli2023-02-157-72/+170
| | | | | | | InetAddress (#1959) - upgrade Mockito to 4.9.0 - use BurningWave DNS mock tools
* [ZOOKEEPER-4674] TestReadOnlyClient.cc: Stop/start "normal" server in test ↵Enrico Olivelli2023-02-131-0/+18
| | | | | setUp/tearDown (#1983) Co-authored-by: Damien Diederen <dd@crosstwine.com>
* [ZOOKEEPER-4668] Fix s390x Jenkinsfile and use s390x agent (#1982)Vivian Kong2023-02-131-1/+3
|
* [ZOOKEEPER-4672] Code cleanup - apply JDK7 Diamond operator consistently (#1979)Tim te Beek2023-02-10175-463/+463
| | | Co-authored-by: Moderne <team@moderne.io>
* [ZOOKEEPER-4668] Fix s390x Jenkinsfile (#1981)Vivian Kong2023-02-081-1/+1
|
* Fix add version for container and TTL nodesChris Conroy2023-02-081-2/+2
| | | | | | | | | | Container and TTL nodes were added in 3.5.3 (not 3.6) according to earlier docs: https://zookeeper.apache.org/doc/r3.5.3-beta/zookeeperProgrammers.html#Container+Nodes Author: Chris Conroy <cconroy@gmail.com> Reviewers: maoling <maoling@apache.org> Closes #1948 from cconroy/patch-1
* [ZOOKEEPER-4668] Add s390x Jenkinsfile (#1975)Vivian Kong2023-02-081-0/+71
|
* [ZOOKEEPER-4669] Upgrade snappy-java to 1.1.9.1 (#1976)Martin Polden2023-02-022-1/+1
| | | | | Signed-off-by: Chris Nauroth <cnauroth@apache.org> Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
* ZOOKEEPER-4571: Admin server API for restore database from a snapshot (#1961)li4wang2023-01-2618-162/+891
| | | | | | | Provides a restore command for restoring database from a snapshot Author: Li Wang <liwang@apple.com> Co-authored-by: liwang <liwang@apple.com>
* [ZOOKEEPER-4666] Fix license files for Netty: some files are for 4.1.76 and ↵Enrico Olivelli2023-01-252-0/+0
| | | | some other files are for 4.1.86 (#1974)
* Revert "ZOOKEEPER-1875: NullPointerException in ↵Enrico Olivelli2023-01-244-92/+13
| | | | | | ClientCnxn$EventThread.processEvent" This reverts commit 86690ff40cb5c9f5782f0971db16e8fd1c3528e6.
* [ZOOKEEPER-4660] Suppress false positive OWASP failure for CVE-2021-37533 ↵Enrico Olivelli2023-01-231-0/+4
| | | | (#1971)
* [ZOOKEEPER-4661] Upgrade Jackson Databind to 2.13.4.2 for CVE-2022-42003 ↵Enrico Olivelli2023-01-231-1/+1
| | | | CVE-2022-42004 (#1972)
* [ZOOKEEPER-4659] Upgrade commons-cli to 1.5.0 (#1970)Enrico Olivelli2023-01-202-1/+1
|
* ZOOKEEPER-4649: Upgrade netty to 4.1.86 because of CVE-2022-41915 (#1963)Mate Szalay-Beko2023-01-198-55/+172
| | | Co-authored-by: Mate Szalay-Beko <symat@apache.com>
* ZOOKEEPER-4657: Publish SBOM artifacts (#1969)Dongjoon Hyun2023-01-121-0/+17
| | | | | Reviewed-by: Vinod Anandan <vinod@owasp.org> Signed-off-by: Chris Nauroth <cnauroth@apache.org>
* ZOOKEEPER-4570: Admin server API for taking snapshot and stream out data (#1943)li4wang2023-01-0426-52/+1073
| | | | | | | | Provides a snapshot command for taking snapshot and streaming out data Author: Li Wang <liwang@apple.com> Co-authored-by: Li Wang <liwang@apple.com> Co-authored-by: Enrico Olivelli <eolivelli@apache.org>
* ZOOKEEPER-4654: Fix C client test compilation error in Util.cc.Chris Nauroth2022-12-181-0/+2
| | | | | | | | Author: Chris Nauroth <cnauroth@apache.org> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1967 from cnauroth/ZOOKEEPER-4654
* ZOOKEEPER-4641: GH CI fails with error: implicit declaration of function ↵Enrico Olivelli2022-12-151-5/+0
| | | | | | | | | | | | | | | | FIPS_mode Modifications: - remove the block, as it is used only for debug More details here: https://issues.apache.org/jira/browse/ZOOKEEPER-4641 Author: Enrico Olivelli <enrico.olivelli@datastax.com> Reviewers: Andor Molnar <andor@apache.org>, Chris Nauroth <cnauroth@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1951 from eolivelli/fix/ZOOKEEPER-4641
* ZOOKEEPER-4627: Upgraded jetty library. (#1955)Mike Dobozy2022-12-138-1/+1
| | | | | | | Co-authored-by: Mike Dobozy <mdobozy@redhat.com> Co-authored-by: Anup Ghatage <ghatage@apache.org> Signed-off-by: Chris Nauroth <cnauroth@apache.org> Reviewed-by: Mate Szalay-Beko <symat@apache.org>
* [ZOOKEEPER-4642] Remove Travis CIEnrico Olivelli2022-12-101-35/+0
|
* Merge pull request #1944 from li4wang/ZOOKEEPER-4632Chris Nauroth2022-11-131-2/+2
|\ | | | | | | | | ZOOKEEPER-4632: Fix NPE from ConnectionMetricsTest.testRevalidateCount Signed-off-by: Chris Nauroth <cnauroth@apache.org>
| * ZOOKEEPER-4632: Fix NPE from ConnectionMetricsTest.testRevalidateCountliwang2022-11-081-2/+2
|/ | | | Author: Li Wang <liwang@apple.com>
* Merge pull request #1942 from cnauroth/ZOOKEEPER-4460Chris Nauroth2022-11-0224-99/+99
|\ | | | | | | | | ZOOKEEPER-4460: QuorumPeer overrides Thread.getId with different sema… Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
| * ZOOKEEPER-4460: QuorumPeer overrides Thread.getId with different semantics.Chris Nauroth2022-11-0224-99/+99
|/
* ZOOKEEPER-4303: Allow configuring client port to 0Mike Drob2022-10-116-15/+83
| | | | | | | | | | | | https://issues.apache.org/jira/browse/ZOOKEEPER-4303 Allows specifying an explicit port 0 for the client port or secure client port, which will default to operating system behavior of finding an unbound port. Modified ZKServerEmbedded to report the actual port instead of the configured port. Author: Mike Drob <mdrob@apple.com> Reviewers: Kezhu Wang <kezhuw@gmail.com>, Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1868 from madrob/zookeeper-4303
* ZOOKEEPER-4575: ZooKeeperServer#processPacket take record instead of bytestison2022-10-0531-294/+438
| | | | | | | | | | This is the first step mentioned in [ZOOKEEPER-102](https://issues.apache.org/jira/browse/ZOOKEEPER-102) and we should not play with ByteBuffer among the request handling code path. Author: tison <wander4096@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1905 from tisonkun/request-supplier
* ZOOKEEPER-4616: Upgrade docker image to resolve CVEschenhang2022-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | The current docker image `maven:3.6.3-jdk-8` has many critical security issues. maven3.6.3-jdk-8 › dpkg1.19.7 has [CVE-2022-1664](https://www.cve.org/CVERecord?id=CVE-2022-1664) maven3.6.3-jdk-8 › openssl1.1.1d-0+deb10u6 has [CVE-2021-3711](https://www.cve.org/CVERecord?id=CVE-2021-3711) maven3.6.3-jdk-8 › gzip1.9-3 has [CVE-2022-1271](https://www.cve.org/CVERecord?id=CVE-2022-1271) We need to upgrade the docker base image to version `maven:3.8.4-jdk-8` See [ZOOKEEPER-4616](https://issues.apache.org/jira/browse/ZOOKEEPER-4616) for full details. Author: chenhang <chenhang@apache.org> Reviewers: Enrico Olivelli <eolivelli@apache.org> Closes #1927 from hangc0276/chenhang/ZOOKEEPER-4616
* ZOOKEEPER-4327: Fix flaky RequestThrottlerTestKezhu Wang2022-09-253-19/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR tries to fix several test failures in `RequestThrottlerTest`. First, `RequestThrottlerTest#testDropStaleRequests`. Place `Thread.sleep(200)` after `submittedRequests.take()` in `RequestThrottler#run` will fail two assertions: 1. `assertEquals(2L, (long) metrics.get("prep_processor_request_queued"))` 2. `assertEquals(1L, (long) metrics.get("request_throttle_wait_count"))` This happens due to `setStale` chould happen before throttle handling. This commit solves this by introducing an interception point `RequestThrottler.throttleSleep` to build happen-before relations: 1. `throttling.countDown` happens before `setStale`, this ensures that unthrottled request are processed as usual. 2. `setStale` happens before `throttled.await`, this defends `RequestThrottler.throttleSleep` against spurious wakeup. Second, `RequestThrottlerTest#testRequestThrottler`. * `RequestThrottlerTest.testRequestThrottler:197 expected: <2> but was: <1>` `ZooKeeperServer#submitRequest` and `PrepRequestProcessor#processRequest` run in different threads, thus there is no guarantee on metric `prep_processor_request_queued` after `submitted.await(5, TimeUnit.SECONDS)`. Place `Thread.sleep(200)` before `zks.submitRequestNow(request)` in `RequestThrottler#run` will incur this failure. * `RequestThrottlerTest.testRequestThrottler:206 expected: <5> but was: <4>` `entered.await(STALL_TIME, TimeUnit.MILLISECONDS)` could return `false` due to almost same timeout as `RequestThrottler#throttleSleep`. Place `Thread.sleep(500)` around `throttleSleep` will increase failure possibility. Third, `RequestThrottlerTest#testGlobalOutstandingRequestThrottlingWithRequestThrottlerDisabled`. * `RequestThrottlerTest.testGlobalOutstandingRequestThrottlingWithRequestThrottlerDisabled:340 expected: <3> but was: <4>` `ZooKeeperServer#shouldThrottle` depends on consistent sum of `getInflight` and `getInProcess`. But it is no true. Place `Thread.sleep(200)` before `zks.submitRequestNow(request)` in `RequestThrottler#run` could reproduce this. Sees also https://github.com/apache/zookeeper/pull/1739, https://github.com/apache/zookeeper/pull/1821. Author: Kezhu Wang <kezhuw@gmail.com> Reviewers: Mate Szalay-Beko <symat@apache.org>, maoling <maoling@apache.org> Closes #1887 from kezhuw/ZOOKEEPER-4327-flaky-RequestThrottlerTest.testDropStaleRequests
* ZOOKEEPER-4547: Change the documentation of client.certReload numbersliwang2022-09-041-1/+1
| | | | | | | | | | | | changed the versions to `New in 3.7.2, 3.8.1, 3.9.0:` Author: Li Wang <li4wanggmail.com> Author: liwang <liwang@apple.com> Reviewers: Mate Szalay-Beko <symat@apache.org>, maoling <maoling@apache.org> Closes #1886 from li4wang/ZOOKEEPER-4547
* ZOOKEEPER-4565: Refine chroot strip to accommodate /zookeeper/ subtreeKezhu Wang2022-07-262-8/+36
| | | | | | | | | | | | | | | | | | | ```java if (serverPath.length() > chrootPath.length()) { event.setPath(serverPath.substring(chrootPath.length())); } ``` Currently, chroot strip code listed above could result in illegal path (aka. path not start with "/"). This will disconnect zookeeper client due to `StringIndexOutOfBoundsException` from `PathParentIterator.next` in event handling. Author: Kezhu Wang <kezhuw@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1899 from kezhuw/ZOOKEEPER-4565-refine-chroot-strip
* ZOOKEEPER-4566: Create tool for recursive snapshot analysisSzabolcs Bukros2022-07-134-0/+238
| | | | | | | | | | | add a tool to recursively collect and display child count and data stored in sub-trees Author: Szabolcs Bukros <szabolcs@cloudera.com> Reviewers: Andor Molnar <andor@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1902 from BukrosSzabolcs/ZOOKEEPER-4566
* ZOOKEEPER-4573: Encapsulate request bytebuffer in Requesttison2022-07-1218-166/+156
| | | | | | | | | | | | This patch is based on #1903. This closes #1903. Author: tison <wander4096@gmail.com> Reviewers: Andor Molnar <andor@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1904 from tisonkun/encapsulate-request-bytebuffer
* ZOOKEEPER-4492: Merge readOnly field into ConnectRequest and Responsetison2022-06-2713-97/+155
| | | | | | | | | | | | | | According to [this comment in ZOOKEEPER-102](https://issues.apache.org/jira/browse/ZOOKEEPER-102?focusedCommentId=16977000&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16977000) I introduce a `Protocol` abstraction and going to moving all wire protocol concept into `cnxn` and this scope, so that client and server's business logics handle only deserialized/real record. cc eolivelli maoling Randgalt This supersedes #1832. Author: tison <wander4096@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1837 from tisonkun/protocol
* ZOOKEEPER-4511: Fix flaky test ↵Kezhu Wang2022-06-242-27/+38
| | | | | | | | | | | | | | | | | | FileTxnSnapLogMetricsTest.testFileTxnSnapLogMetrics This test writes txns to trigger snapshot and expects some txns remain in txn log. But snapshot taking is asynchronous, thus all txns could be written to snapshot. So in restarting, it is possible that no txns to load after snapshot restored. This will fail assertion. This commit solves this by disable automic snapshot taking by `SyncRequestProcessor.setSnapCount(Integer.MAX_VALUE)`. Author: Kezhu Wang <kezhuw@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1852 from kezhuw/ZOOKEEPER-4511-FileTxnSnapLogMetricsTest-testFileTxnSnapLogMetrics