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

Branch 3.5.4 #5

Open
wants to merge 388 commits into
base: master
Choose a base branch
from
Open

Branch 3.5.4 #5

wants to merge 388 commits into from

Conversation

RokLenarcic
Copy link
Owner

No description provided.

rgs1 and others added 30 commits November 21, 2015 23:35
(Marshall McMullen via rgs)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718208 13f79535-47bb-0310-9956-ffa450edef68
….StaticHostProviderTest (Timothy Ward via cnauroth)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1719205 13f79535-47bb-0310-9956-ffa450edef68
…ch ZooKeeperSaslClient instance (yuemeng via rakeshr)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733222 13f79535-47bb-0310-9956-ffa450edef68
…Keeper process is already running (gsbiju via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733347 13f79535-47bb-0310-9956-ffa450edef68
Randgalt and others added 9 commits May 9, 2018 15:11
There was a major oversight when TTL nodes were implemented. The session ID generator for each server is seeded with the configured Server ID in the high byte. TTL Nodes were using the highest bit to denote a TTL node when used in the ephemeral owner. This meant that Server IDs > 127 that created ephemeral nodes would have those nodes always considered TTL nodes (with the TTL being essentially a random number).

This PR fixes the issue by disabling TTL Nodes by default. They must now be enabled in zoo.cfg. When TTL Nodes are enabled, the max Server ID changes from 255 to 254. This allows the high byte of a session ID stored in the ephemeral owner to use 0xFF to denote a TTL node.

About this change:

- The doc has been updated to note that TTL nodes are disabled by default and must be enabled via config. Also, the docs explains that when TTL nodes are enabled the max Server ID becomes 254
- The TTL implementation has been updated to use 0xFF in the high byte of the ephemeralOwner to denote a TTL node. This decreases the max TTL by an insignificant amount
- PrepRequestProcessor now throws `KeeperException.UnimplementedException` when an attempt to create a TTL node is made but the server has not been configured to enable TTL Nodes.
- QuorumPeer throws a `RuntimeException` if TTL Nodes are enabled but the Server ID > 254
- Tests have been added to validate all of this

IMPORTANT NOTE: TTL Nodes created in 3.5.3 will revert to EPHEMERAL with this change. We need to discuss the impact of this and consider workarounds, etc.

Author: randgalt <jordan@jordanzimmerman.com>
Author: Abraham Fine <afine@apache.org>

Reviewers: phunt@apache.org

Closes apache#377 from Randgalt/ZOOKEEPER-2901

Change-Id: I6923a22ecf847710d4e7151daf8c044734873f6b
(cherry picked from commit ceaeccd)
Signed-off-by: Patrick Hunt <phunt@apache.org>
…e hardcode test folders

A little bit more than just fixing the hardcoded folder names. Because the original issue was only on the 3.4 branch, the unit test has also been added to that branch only.

In this PR I add the fixed version of test to the master branch. Should be committed to 3.5 as well and I'll create a separate PR for 3.4

https://issues.apache.org/jira/browse/ZOOKEEPER-3012

Author: Andor Molnar <andor@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#514 from anmolnar/ZOOKEEPER-3012

Change-Id: Iabba2630008158580a121a007a5c45b43a301315
(cherry picked from commit 43f117e)
Signed-off-by: Patrick Hunt <phunt@apache.org>
A few nitpicks which needs to be cleaned up:

1. Rename OldEphemeralType --> EphemeralTypeEmulate353
2. Remove unused method: getTTL()
3. Remove unused import from QuorumPeer

Author: Andor Molnar <andor@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#516 from anmolnar/ZOOKEEPER-3038

Change-Id: Iec537706a35863d53daa593da2b01f6e523ef466
(cherry picked from commit 6e64125)
Signed-off-by: Patrick Hunt <phunt@apache.org>
Fixed by creating a single Scanner for all queries in the main() method.

Author: Andor Molnar <andor@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#517 from anmolnar/ZOOKEEPER-3039 and squashes the following commits:

a35e2e2 [Andor Molnar] ZOOKEEPER-3039. Optimize imports
a196443 [Andor Molnar] ZOOKEEPER-3039. Use the same Scanner for all queries

Change-Id: Icf66888d4e6ad902615ed8ffde58a5a8fdd41237
(cherry picked from commit 2fa315b)
Signed-off-by: Patrick Hunt <phunt@apache.org>
Making the throttle check before passing over the request to the next thread will prevent the possibility of throttling code running after unthrottle

Added an additional async hammer thread which is pretty reliably reproduces the race condition. The globalOutstandingLimit is decreased so throttling code is executed.

Author: Botond Hejj <botond.hejj@gmail.com>

Reviewers: Andor Molnár <andor@apache.org>, Norbert Kalmar <nkalmar@yahoo.com>, Benjamin Reed <breed@apache.org>

Closes apache#563 from bothejjms/ZOOKEEPER-3072

(cherry picked from commit 2a372fc)
Signed-off-by: Benjamin Reed <breed@apache.org>
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
@RokLenarcic RokLenarcic reopened this Mar 28, 2022
RokLenarcic pushed a commit that referenced this pull request Sep 3, 2022
This is a master branch version of: apache#654

The previous PR was for branch 3.5, and couldn't be merged as that branch is closed for new features.

The Zookeeper libraries currently allow you to set up your SSL Context via system properties such as "zookeeper.ssl.keyStore.location" in the X509Util. This covers most simple use cases, where users have software keystores on their harddrive.

There are, however, a few additional scenarios that this doesn't cover. Two possible ones would be:

1. The user has a hardware keystore, loaded in using PKCS11 or something similar.
2. The user has no access to the software keystore, but can retrieve an already-constructed SSLContext from their container.

For this, I would propose that the X509Util be extended to allow a user to set a property "zookeeper.ssl.client.context" to provide a class which supplies a custom SSL context. This gives a lot more flexibility to the ZK client, and allows the user to construct the SSLContext in whatever way they please (which also future proofs the implementation somewhat).

I added a few simple tests to this class around setting the SSLContext, and setting an invalid one. I'm not testing the actual functionality of the SSLContext, etc.

Author: Alex Rankin <davelister@gmail.com>
Author: Alex Rankin <alex.rankin@mastercard.com>

Reviewers: andor@apache.org

Closes apache#728 from arankin-irl/ZOOKEEPER-3160 and squashes the following commits:

a20c62f [Alex Rankin] Merge branch 'master' into ZOOKEEPER-3160
5a9b8fc [Alex Rankin] Merge pull request #7 from apache/master
3c3dfdd [Alex Rankin] Re-ordering imports.
69e0b6c [Alex Rankin] Updating custom SSLContext supplier with review comments
874529b [Alex Rankin] Using supplier interface instead of custom interface, and renaming property
ec27260 [Alex Rankin] Merge branch 'master' into ZOOKEEPER-3160
75a010e [Alex Rankin] Merge pull request #6 from apache/master
838f61c [Alex Rankin] Merge branch 'master' into ZOOKEEPER-3160
f85d7e5 [Alex Rankin] Merge pull request #5 from apache/master
31d8dd5 [Alex Rankin] Extracting SSLContext creation from config to new method.
400839a [Alex Rankin] Adding ability to specify custom SSLContext for client
7ae7485 [Alex Rankin] Merge pull request #4 from apache/master
@RokLenarcic RokLenarcic reopened this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet