-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-3863: Do not track global sessions in ReadOnlyZooKeeperServer #1380
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
Conversation
hanm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We could also just make ReadOnlyZooKeeperServer extends LearnerZooKeeperServer as opposed to extend ZooKeeperServer, so we can reuse the LearnerSessionTracker without customizing ReadOnlyZooKeeperServer. We also need add the start to the SessionTracker interface to avoid casting all over the place. Anyway, seems some mess that can be cleaned up a little bit over the code base regarding session handling, let's do that separately.
|
This PR now includes ZOOKEEPER-3863 and ZOOKEEPER-3864 and updated unit tests. |
|
can't figure out what's wrong with the build. The only msg is "An error occurred while generating the build script." |
hanm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. ran this patch locally and all test pass.
|
retest maven build |
1 similar comment
|
retest maven build |
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
|
I have triggered Travis |
|
Making good progress now, with Travis green :) Jenkins is consistently failing with C client read-only tests:
@jhuan31 I think we need update C read only test similar like we did for Java test to explicit set/enable local session in test, because we are now rejecting global session for read only servers. |
|
I did a super quick look on the C test, looks like no easy way to programmatically enable local session on the |
|
ah, didn't know that C test needs to be updated too. taking a look. |
|
retest maven build |
|
@jhuan31 The latest pre-merge job pass - looks like we don't have any issues on C client side. I also verified this pull request locally (CentOS) and all C client test pass. Not sure why the previous pre-merge job gives specific errors on read-only related test failures. @eolivelli Since we have a green build (pre-merge) now, should we commit this change? Both of us is +1 on this. I hope I can trigger a JenkinsMaven build for this but I don't know how - a green pre-merge build seems enough. This will be a very valuable additions to ZooKeeper as it fixes ReadOnly mode, which is super useful for service discovery use cases. |
|
@hanm yes we can commit it |
`TestReadOnly` fails due to ZOOKEEPER-3863(apache/zookeeper#1380). ZOOKEEPER-3863 uses `QuorumPeerConfig.localSessionsEnabled` to toggle local sessions supports in `ReadOnlyZooKeeperServer`. This pr populates `QuorumPeerConfig.localSessionsEnabled` and `QuorumPeerConfig.localSessionsUpgradingEnabled` from system property `readonlymode.enabled` for simplicity.
`TestReadOnly` fails due to ZOOKEEPER-3863(apache/zookeeper#1380). ZOOKEEPER-3863 uses `QuorumPeerConfig.localSessionsEnabled` to toggle local sessions supports in `ReadOnlyZooKeeperServer`. This pr populates `QuorumPeerConfig.localSessionsEnabled` and `QuorumPeerConfig.localSessionsUpgradingEnabled` from system property `readonlymode.enabled` for simplicity.
`TestReadOnly` fails due to ZOOKEEPER-3863(apache/zookeeper#1380). ZOOKEEPER-3863 uses `QuorumPeerConfig.localSessionsEnabled` to toggle local sessions supports in `ReadOnlyZooKeeperServer`. This pr populates `QuorumPeerConfig.localSessionsEnabled` and `QuorumPeerConfig.localSessionsUpgradingEnabled` from system property `readonlymode.enabled` for simplicity.
Author: Jie Huang <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Michael Han <[email protected]> Closes apache#1380 from jhuan31/ZOOKEEPER-3863
Author: Jie Huang <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Michael Han <[email protected]> Closes apache#1380 from jhuan31/ZOOKEEPER-3863
Author: Jie Huang <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Michael Han <[email protected]> Closes apache#1380 from jhuan31/ZOOKEEPER-3863
Author: Jie Huang <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Michael Han <[email protected]> Closes apache#1380 from jhuan31/ZOOKEEPER-3863
No description provided.