Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test big #7

Open
wants to merge 1,001 commits into
base: master
Choose a base branch
from
Open

Test big #7

wants to merge 1,001 commits into from

Conversation

RokLenarcic
Copy link
Owner

No description provided.

hanm and others added 30 commits September 3, 2022 15:11
snapshot.trust.empty can be used in both zoo.cfg file (with name snapshot.trust.empty), and as a system property (with name zookeeper.snapshot.trust.empty).

Author: Michael Han <lhan@twitter.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1178 from hanm/ZOOKEEPER-3056
This is the 2nd part of data consistency based on digest, it checks the DataTree digest on every txn during broadcast time.

Author: Fangmin Lyu <fangmin@apache.org>
Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Andor Molnar <andor@apache.org>, Michael Han <hanm@apache.org>

Closes apache#1059 from lvfangmin/ZOOKEEPER-3512
Author: ZWShuai91 <17610028856@163.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1142 from ZWShuai91/ZOOKEEPER-3582
- add LICENSE files for Snappy and Metrics core
- update Copyright year
- copy airlift reference to the NOTICE file of the binary packages
- copy the Java 8 disclaimer from branch-3.5

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: Andor Molnar <anmolnar@apache.org>

Closes apache#1196 from eolivelli/fix/license-stuff
Batch mode never was implemented in `cli_mt`.  This patch seems to work, but:

1. There may be a cleaner way of waiting for the completion;
2. ~~`nanosleep` is POSIX; the Windows path should probably use `Sleep`~~ (DONE).

symat: Comments welcome.

Author: Damien Diederen <dd@crosstwine.com>

Reviewers: andor@apache.org

Closes apache#1173 from ztzg/ZOOKEEPER-3640-implement-batch-mode-in-cli-mt
Author: Colm O hEigeartaigh <coheigea@apache.org>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1165 from coheigea/ZOOKEEPER-3638
Author: hammerle <hammerle@fb.com>

Reviewers: hanm@apache.org, fangmin@apache.org

Closes apache#1189 from hammerlefb/syncrequestfix
As Travis CI [officially supports](https://blog.travis-ci.com/2019-11-12-multi-cpu-architecture-ibm-power-ibm-z) s390x builds, adding support for same.

Author: sangitanalkar <snalkar@us.ibm.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Andor Molnar <anmolnar@apache.org>

Closes apache#1166 from sangitanalkar/s390x-travisCI
Author: David Mollitor <dmollitor@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1207 from belugabehr/ZOOKEEPER-3679
As per [ZOOKEEPER-2083](https://jira.apache.org/jira/browse/ZOOKEEPER-2083) we need to remove class AuthFastLeaderElection.java so I made changes in Quorumpeer.java by removing two cases 1 and 2 present in createElectionAlgorithm as QuorumPeerconfig.electioalg is always 3.

Please do let me know if anything additional needs to be done.

Author: ravowlga123 <ravowlga@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Andor Molnar <anmolnar@apache.org>, Patrick Hunt <phunt@apache.org>

Closes apache#1171 from ravowlga123/ZOOKEEPER-2083
As per the ticket [ZOOKEEEPER-3649](https://issues.apache.org/jira/browse/ZOOKEEPER-3649) we need to add line break ls -s command.

To achieve the desired behavior I have added new line character in option.add of  LsCommand.printChildren(). Please do let me know if made changes gives us the desired behavior or if anything else needs to be changed.

Author: ravowlga123 <ravowlga@gmail.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1183 from ravowlga123/ZOOKEEPER-3649 and squashes the following commits:

f2e1997 [ravowlga123] ZOOKEEPER-3649 Removed additional new line from printChildren
b36d636 [ravowlga123] ZOOKEEPER-3649 Add a line break in ls -s CLI
Removed Ls2Command.java, DeleteAllCommand.printdeprecatedwarning(), statements creating new objects for ls2 and rmr in ZookeeperMain.java. Updated zookeeperCLI.md and ZookeeperTest.java.

Please do let me know if any additional changes are needed

Author: ravowlga123 <ravowlga@gmail.com>

Reviewers: andor@apache.org

Closes apache#1175 from ravowlga123/ZOOKEEPER-3411
Author: David Mollitor <dmollitor@apache.org>

Reviewers: Norbert Kalmar <nkalmar@apache.org>

Closes apache#1206 from belugabehr/ZOOKEEPER-3678
Author: David Mollitor <dmollitor@apache.org>

Reviewers: eolivelli@apache.org, maoling199210191@sina.com, fangmin@apache.org

Closes apache#1218 from belugabehr/ZOOKEEPER-3694
….6.0

- use the same configuration as in Apache Parent Pom to generate the source tarball
- drop the custom made configuration for the source tarball

Author: Enrico Olivelli <enrico.olivelli@diennea.com>

Reviewers: andor@apache.org

Closes apache#1226 from eolivelli/fix/ZOOKEEPER-3695-source-tarball and squashes the following commits:

781d95e [Enrico Olivelli] Fix typo
21eac30 [Enrico Olivelli] Fix formatting and add comment
7eca978 [Enrico Olivelli] ZOOKEEPER-3695 Source release tarball does not match repository in 3.6.0 - use the same configuration as in Apache Parent Pom to generate the source tarball - drop the custom made configuration for the source tarball
…4j 1.2 deserialization of untrusted data in SocketServer

Suppress error for CVE-2019-17571 as it does not affect us.
We are not running the log4j server.

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: phunt@apache.org

Closes apache#1209 from eolivelli/fix/ZOOKEEPER-3677-owasp-log4j

Change-Id: I0ef24a7b142cd32ccf4f5c18f9e0c0132a413d6c
…ception

Author: sujithsimon22 <sujith.abraham.simon@huawei.com>

Reviewers: Mohammad Arshad <arshad@apache.org>

Closes apache#1222 from sujithsimon22/3667
…when user accidentally includes spaces at the end of the value

Author: sujithsimon22 <sujith.abraham.simon@huawei.com>

Reviewers: Allan Lyu <fangmin@apache.org>,Justin Mao Ling <maoling199210191@sina.com>,Mohammad Arshad <arshad@apache.org>

Closes apache#1190 from sujithsimon22/3613
Author: David Mollitor <dmollitor@apache.org>

Reviewers: fangmin@apache.org, andor@apache.org

Closes apache#1197 from belugabehr/ZOOKEEPER-3669
Author: David Mollitor <dmollitor@apache.org>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1193 from belugabehr/ZOOKEEPER-3663
As per [ZOOKEEPER-3666](https://issues.apache.org/jira/browse/ZOOKEEPER-3666), we need to remove the deprecated LogFormatter tool. For this I made the following changes:
- Removed LogFormatter class
- Removed testLogFormatter test from InvalidSnapshotTest
- Changed zookeeperAdmin.md file

Please let me know if additional changes are required.

Author: Nishanth Entoor <entoor.nishanth@gmail.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1200 from nishanth-entoor/ZOOKEEPER-3666
We had some issues about configuring Kerberos authentication with SSL, so I created some unit tests to verify that these features work together. The problem was originally reported on 3.5.5. There was some conflicts to backport the tests to 3.5, I will prepare a separate PR on that branch.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>
Author: Mate Szalay-Beko <mszalay@cloudera.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1204 from symat/ZOOKEEPER-3482-master and squashes the following commits:

53194f5 [Mate Szalay-Beko] ZOOKEEPER-3482: update SASL related documentation
576ac0b [Mate Szalay-Beko] Merge remote-tracking branch 'apache/master' into ZOOKEEPER-3482-master
28da105 [Mate Szalay-Beko] ZOOKEEPER-3482: reload SASL and Kerberos configs before executing the tests
396c73e [Mate Szalay-Beko] ZOOKEEPER-3482: add unit tests for client SASL authentication over SSL
…ibrary

This is a "respin" of apache#1054, which I withdrew due to some annoying shortcomings.

This changeset allows C clients to use SASL to authenticate with the ZooKeeper server.  It is loosely based on patches #1 and #2 by Tom Klonikowski, at https://reviews.apache.org/r/2252/, but the result has been extensively reworked to follow the semantics of the Java client:

  * No SASL operations are exposed through the API;

  * The configuration is provided, and stored, at "handle init time";

  * SASL authentication is automatically performed after each (re)connect.

It introduces an optional dependency on the Cyrus SASL library, which can either be autodetected (default) or configured using the `--without-sasl`/`--with-sasl[=DIR]` flags, or -DWITH_CYRUS_SASL for CMake/Windows.

`TestServerRequireClientSASLAuth.cc` has been renamed to `TestSASLAuth.cc`, and a test has been added which successfully (re)authenticates using the `DIGEST-MD5` mechanism.  The code has also been used to successfully authenticate clients via `GSSAPI`/Kerberos.

This commit also adds SASL support to the `cli.c` client.

Co-authored-by: Tom Klonikowski <klonik_tinformatik.haw-hamburg.de>

Author: Damien Diederen <dd@crosstwine.com>

Reviewers: Mate Szalay-Beko <szalay.beko.mate@gmail.com>, Norbert Kalmar <nkalmar@apache.org>

Closes apache#1134 from ztzg/ZOOKEEPER-1112-c-client-sasl-support-v2
Latest version of jackson-databind is 2.9.10.2.

Change-Id: Id2b0f17c2dfa9a9765fd4893643007b49f06816d

Author: Patrick Hunt <phunt@apache.org>

Reviewers: Norbert Kalmar <nkalmar@apache.org>

Closes apache#1232 from phunt/ZOOKEEPER-3699
…ster locally

When we tested RC 3.6.0, we had a problem of starting ZooKeeper cluster with large
number (11+) of ensemble members locally on mac. We found exceptions in the logs
when the new MultiAddress feature tries to filter the unreachable hosts from the
address list. This involves the calling of the InetAddress.isReachable method with
a default timeout of 500ms, which goes down to a native call in java and basically
try to do a ping (an ICMP echo request) to the host. Naturally, the localhost should
be always reachable.

The problem was that on mac we have the ICMP rate limit set to 250 by default.

In this patch we:
- changed the reachability check behavior by disabling the check if there is only
a single address provided (so we wouldn't be able to filter the unreachable
addresses anyway).
- added and documented a configuration parameter to disable the reachability check
for testing. (default: enabled)
- added and documented a configuration parameter to set the timeout for the
reachability checks. (default: 1000ms)

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1228 from symat/ZOOKEEPER-3698-branch-3.6

(cherry picked from commit 8352f78)
Signed-off-by: Andor Molnar <andor@apache.org>
… to race

Resurrecting an ancient ticket which could be fixed with a simple patch.

Jira mentions a scenario when auto purging tool is in use and Zookeeper server could have a race condition when creating snapshot and data directories. (directory auto creating is enabled by default)

Double checking the directory existence might help with it.

Author: Andor Molnar <andor@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1225 from anmolnar/ZOOKEEPER-1936
Upgrade to the latest version of maven dependency checker.

Change-Id: I5ac9c77bb02f54784ff3ed4bb668fe38fd88ee11

Author: Patrick Hunt <phunt@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1231 from phunt/ZOOKEEPER-3704
Author: Jie Huang <jiehuang@fb.com>

Reviewers: eolivelli@apache.org, fangmin@apache.org

Closes apache#1116 from jhuan31/ZOOKEEPER-3575
This PR is about adding SSL support for zkPython, based on the C-binding. I also fixed the zkpython ant build to work with the current maven top-level build. I also added a new python test case to try to connect to ZooKeeper with SSL.

You can test this patch in the following way:
```
# cleanup everything, just to be on the safe side:
git clean -xdf

# on ubuntu 16.4 make sure you have the following packages installed
apt-get install -y libcppunit-dev openssl libssl-dev python-setuptools python2.7 python2.7-dev

# make a full build (incl. C-client)
mvn clean install -DskipTests -Pfull-build

# we only support python2, so e.g. on ubuntu 18.4 you need to switch to python2
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

# compile and test zkpython
cd zookeeper-contrib/zookeeper-contrib-zkpython/
ant compile
ant test
```

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: andor@apache.org

Closes apache#1121 from symat/ZOOKEEPER-3567 and squashes the following commits:

a5839cb [Mate Szalay-Beko] Merge remote-tracking branch 'apache/master' into ZOOKEEPER-3567
d25d610 [Mate Szalay-Beko] ZOOKEEPER-3567: fix build issues after top-level ant removal
a8869c9 [Mate Szalay-Beko] Merge remote-tracking branch 'apache/master' into HEAD
b92f686 [Mate Szalay-Beko] ZOOKEEPER-3567: fix license check issue
0150986 [Mate Szalay-Beko] ZOOKEEPER-3567: removing code duplication: re-use test SSL certificate generator from C-client tests
7d91359 [Mate Szalay-Beko] ZOOKEEPER-3567: add SSL support for zkpython
**Thanks for Lincoln Lee for the original fix!**

In the current implementation, we always get a WARN in server side
("EndOfStreamException: Unable to read additional data from client")
whenever we close a zookeeper handler from the C client. This also happens
in the end of every execution of the command line C client.

The reason is that currently we don't wait for the response from the server
when we initiate the closing of the client connection, and we terminate
the socket on the client side too early.

I tested the patch both on linux and windows. I also tested it both with
NIO and Netty server side socket implementations.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: Andor Molnar <andor@apache.org>, Norbert Kalmar <nkalmar@apache.org>

Closes apache#1176 from symat/ZOOKEEPER-1105
Copy link

@cs-rok-onprem-delta-analysis cs-rok-onprem-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • View detailed results in CodeScene
  • Quality Gates: FAILED
  • Recommended Review Level: Detailed -- Inspect the code that degrades in code health.

@RokLenarcic RokLenarcic reopened this Sep 20, 2022
Copy link

@cs-rok-onprem-delta-analysis cs-rok-onprem-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • View detailed results in CodeScene
  • Quality Gates: FAILED
  • Recommended Review Level: Detailed -- Inspect the code that degrades in code health.

@RokLenarcic RokLenarcic reopened this Sep 23, 2022
Copy link

@cs-rok-onprem-delta-analysis cs-rok-onprem-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • View detailed results in CodeScene
  • Quality Gates: FAILED
  • Recommended Review Level: Detailed -- Inspect the code that degrades in code health.

@RokLenarcic RokLenarcic reopened this Sep 26, 2022
Copy link

@cs-rok-onprem-delta-analysis cs-rok-onprem-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • View detailed results in CodeScene
  • Quality Gates: FAILED
  • Recommended Review Level: Detailed -- Inspect the code that degrades in code health.

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Complex Method

processResult has a cyclomatic complexity of 16, threshold = 9

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Bumpy Road Ahead

processResult has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 4,14 across 14 functions. The mean complexity threshold is 4

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Deep, Nested Complexity

processResult has a nested complexity depth of 4, threshold = 4

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Primitive Obsession

In this module, 70,4% of all function arguments are primitive types, threshold = 30,0%

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Deep, Nested Complexity

main has a nested complexity depth of 5, threshold = 4

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Primitive Obsession

In this module, 68,0% of all function arguments are primitive types, threshold = 30,0%

@@ -1,4 +1,4 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Excess Number of Function Arguments

GenerateLoad.GeneratorInstance.ZooKeeperThread.processResult has 5 arguments, threshold = 4

@@ -30,6 +30,7 @@
import org.apache.zookeeper.ZooDefs.Ids;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Complex Method

testSimpleCase has a cyclomatic complexity of 19, threshold = 9

@@ -30,6 +30,7 @@
import org.apache.zookeeper.ZooDefs.Ids;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Bumpy Road Ahead

testSimpleCase has 5 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet