Re: Name of sequence node is not unique

2023-06-15 Thread Kezhu Wang
Hi, > Note: the counter used to store the next sequence number is a signed int > (4bytes) maintained by the parent node, the counter will overflow when > incremented beyond 2147483647 (resulting in a name "-2147483648"). I wrote a test[1] and found that overflow of cversion results in NODEEXIST

Re: Name of sequence node is not unique

2023-06-15 Thread Josef Roehrl
I wanted to add 2 things. 1. Increasing to a 64-bit counter certainly solves the problem, but this might require conversion of zk data when the current counter is stored as 32-bit 2. A client that relies on a unique version that it uses as a reference outside of zk should verify that a ve

Re: Name of sequence node is not unique

2023-06-15 Thread Ted Dunning
The invariant is that the value should be increasing except in failure modes. You found a somewhat surprising failure mode. Please compute how long it would take for a 64-bit counter to overflow if incremented a million times per second. (hint, half a million years). Remember that zk only does thi

Re: Name of sequence node is not unique

2023-06-15 Thread Li Wang
Thanks a lot for your inputs, Ted. On Thu, Jun 15, 2023 at 2:52 PM Ted Dunning wrote: > Breaking a semantic invariant is a dangerous solution here. Totally agree. We should not break a semantic invariant if there is one. What's the semantic invariant here and how ZK is supposed to behave in the

Re: Name of sequence node is not unique

2023-06-15 Thread Ted Dunning
Breaking a semantic invariant is a dangerous solution here. It would be better to use a longer integer. On Thu, Jun 15, 2023, 13:35 Li Wang wrote: > Thanks for the response, Enrico. > > Please see comments below. > > On Thu, Jun 15, 2023 at 5:47 AM Enrico Olivelli > wrote: > > > Li, > > thank

[jira] [Created] (ZOOKEEPER-4705) Restrict GitHub merge butten to allow squash commit only

2023-06-15 Thread Andor Molnar (Jira)
Andor Molnar created ZOOKEEPER-4705: --- Summary: Restrict GitHub merge butten to allow squash commit only Key: ZOOKEEPER-4705 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4705 Project: ZooKeepe

Re: Name of sequence node is not unique

2023-06-15 Thread Li Wang
Thanks for the response, Enrico. Please see comments below. On Thu, Jun 15, 2023 at 5:47 AM Enrico Olivelli wrote: > Li, > thanks for reporting your problem. > > Most likely you have found a bug. > > I have one question, related to your use case, > is the problem that the numbers are not "uniqu

Re: Netty native libraries in ZooKeeper

2023-06-15 Thread Andor Molnar
Yeah, it works fine with the hardcoded classifier. I'll make this Pulsar approach in the patch. Andor On Thu, 2023-06-15 at 19:50 +0200, Enrico Olivelli wrote: > I may be wrong but Epoll is only a Linux thing probably. > > You don't have it on Mac or Windows > > Enrico > > Il Gio 15 Giu 2023

Re: Netty native libraries in ZooKeeper

2023-06-15 Thread Enrico Olivelli
I may be wrong but Epoll is only a Linux thing probably. You don't have it on Mac or Windows Enrico Il Gio 15 Giu 2023, 19:49 Andor Molnar ha scritto: > Interesting that with only the BOM included and the dependencies > without the classifier, Netty doesn't load the native epoll selector, > bu

Re: Netty native libraries in ZooKeeper

2023-06-15 Thread Andor Molnar
Interesting that with only the BOM included and the dependencies without the classifier, Netty doesn't load the native epoll selector, but loads the native SSL library. I'm confused. In the Pulsar example the sub-project dependency has a hardcoded classifier: io.netty netty-transpo

Re: FIPS: removing ZKTrustManager

2023-06-15 Thread Andor Molnar
Thanks Enrico, we've made a mistake though: discussed that fips-mode will be enabled by default on master branch and disabled by default on branch-3.8. Let me create a separate pull request for that. Andor On Thu, 2023-06-15 at 14:39 +0200, Enrico Olivelli wrote: > Il giorno mer 14 giu 2023 al

Re: Name of sequence node is not unique

2023-06-15 Thread Enrico Olivelli
Li, thanks for reporting your problem. Most likely you have found a bug. I have one question, related to your use case, is the problem that the numbers are not "unique" or that the number is not monotonically increasing ? Do you have 2147483647 concurrent sessions and you found that two sessions

Re: Review request for ZOOKEEPER-4471 and ZOOKEEPER-4472

2023-06-15 Thread Enrico Olivelli
Your patches have been merged to master branch and they will be shipped with 3.9.0. Thank you Enrico Il giorno sab 10 giu 2023 alle ore 18:13 Kezhu Wang ha scritto: > > Hi all and committers, > > [ZOOKEEPER-4471][1] reported that `AddWatchMode.PERSISTENT` could be > partially removed by `Watcher

Re: planning release 3.8.2

2023-06-15 Thread Enrico Olivelli
Thanks for volounteering Il giorno mer 14 giu 2023 alle ore 14:31 Szalay-Bekő Máté ha scritto: > > Hello ZooKeepers, > > release 3.8.1 happened this January and I volunteered to do 3.8.2 soon, > maybe in June or early July. Let me know if someone would also like to do > it, I am happy to hand it

Re: FIPS: removing ZKTrustManager

2023-06-15 Thread Enrico Olivelli
Il giorno mer 14 giu 2023 alle ore 13:43 Andor Molnar ha scritto: > > PR has been created with the proposed resolution: > > https://github.com/apache/zookeeper/pull/2008 Committed to master and branch-3.8 Thank you Enrico > Please review. > > Thanks, > Andor > > > > On Sat, 2023-06-10 at 11:25

Re: JDK 21 is in Rampdown / The importance of testing with Early-Access Builds

2023-06-15 Thread Enrico Olivelli
This is our Jenkins job https://ci-hadoop.apache.org/view/ZooKeeper/job/ZooKeeper-Java-EA/ The latest build passed. We are using openjdk-21-ea+21 on Linux. it seems that it is not the very latest EA (is it +26 ?) >From the output of the jenkins job run: [ZooKeeper-Java-EA] $ /home/jenkins/tool

Re: Netty native libraries in ZooKeeper

2023-06-15 Thread Enrico Olivelli
I think that the best way currently is to add these dependencies: Import the Netty BOM in the main pom.xml io.netty netty-bom ${netty.version} pom import declare netty dependencies without setting the version and the classifier io.netty netty-tcnative-boringssl-static This is

Re: ZooKeeper release 3.9.0

2023-06-15 Thread Enrico Olivelli
Il giorno gio 15 giu 2023 alle ore 13:58 Andor Molnar ha scritto: > > Hi folks, > > There're 64 open tickets which has fixVersion = 3.9.0 > I'll remove the fixVersion from all of them except the ones that we > marked as release blockers. I agree. It is useless to keep the "fixVersion" on an issue

ZooKeeper release 3.9.0

2023-06-15 Thread Andor Molnar
Hi folks, There're 64 open tickets which has fixVersion = 3.9.0 I'll remove the fixVersion from all of them except the ones that we marked as release blockers. Currently: - ZOOKEEPER-4393 Problem to connect to zookeeper in FIPS mode - ZOOKEEPER-4622 Add Netty-TcNative OpenSSL Support - ZOOKEEPE

Netty native libraries in ZooKeeper

2023-06-15 Thread Andor Molnar
Hi, I've come across the following when working on the support of native SSL libraries. Currently ZooKeeper supports loading the native epoll- based event loop of Netty, but a build profile which would download the required dependencies is not shipped with our product. This is perfectly okay sinc