| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Kezhu Wang <kezhuw@gmail.com>
Co-authored-by: tison <wander4096@gmail.com>
|
|
|
|
|
|
|
| |
Closes #1995
Signed-off-by: Chris Nauroth <cnauroth@apache.org>
Reviewed-by: Christopher Tubbs <ctubbsii@apache.org>
|
|
|
| |
Signed-off-by: tison <wander4096@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
(#1908)
|
| |
|
|
|
|
|
|
| |
(Thread.suspend has been removed) (#1985)
* checkstyle
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Co-authored-by: Colvin Cowie <COLVINCO@uk.ibm.com>
|
|
|
| |
Signed-off-by: tison <wander4096@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Author: Li Wang <liwang@apple.com>
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
InetAddress (#1959)
- upgrade Mockito to 4.9.0
- use BurningWave DNS mock tools
|
|
|
|
|
| |
setUp/tearDown (#1983)
Co-authored-by: Damien Diederen <dd@crosstwine.com>
|
| |
|
|
|
| |
Co-authored-by: Moderne <team@moderne.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Signed-off-by: Chris Nauroth <cnauroth@apache.org>
Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
|
|
|
|
|
|
|
| |
Provides a restore command for restoring database from a snapshot
Author: Li Wang <liwang@apple.com>
Co-authored-by: liwang <liwang@apple.com>
|
|
|
|
| |
some other files are for 4.1.86 (#1974)
|
|
|
|
|
|
| |
ClientCnxn$EventThread.processEvent"
This reverts commit 86690ff40cb5c9f5782f0971db16e8fd1c3528e6.
|
|
|
|
| |
(#1971)
|
|
|
|
| |
CVE-2022-42004 (#1972)
|
| |
|
|
|
| |
Co-authored-by: Mate Szalay-Beko <symat@apache.com>
|
|
|
|
|
| |
Reviewed-by: Vinod Anandan <vinod@owasp.org>
Signed-off-by: Chris Nauroth <cnauroth@apache.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Author: Chris Nauroth <cnauroth@apache.org>
Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org>
Closes #1967 from cnauroth/ZOOKEEPER-4654
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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-4632: Fix NPE from ConnectionMetricsTest.testRevalidateCount
Signed-off-by: Chris Nauroth <cnauroth@apache.org>
|
|/
|
|
| |
Author: Li Wang <liwang@apple.com>
|
|\
| |
| |
| |
| | |
ZOOKEEPER-4460: QuorumPeer overrides Thread.getId with different sema…
Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|