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

SOLR-15415 Use Embedded ZK in Tests #522

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

madrob
Copy link
Contributor

@madrob madrob commented Jan 12, 2022

This is a draft PR for the first stage of SIP-14 https://cwiki.apache.org/confluence/display/SOLR/SIP-14+Embedded+Zookeeper

Not all tests are passing yet, but I wanted to put it up sooner than it was done since it does include changes to the public APIs in that I want to get rid of SolrZooKeeper class.

@madrob madrob changed the title SIP-14 Use Embedded ZK in Tests SOLR-15415 Use Embedded ZK in Tests Jan 13, 2022
@@ -73,8 +74,8 @@ public boolean isLikelyExpired(long timeToExpire) {
}
}

public static abstract class IsClosed {
public abstract boolean isClosed();
public interface IsClosed {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Public API Change.


// we use this class to expose nasty stuff for tests
@SuppressWarnings({"try"})
public class SolrZooKeeper extends ZooKeeper {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Public API Change.

// best effort
}
} else {
// TODO?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this have the old reflection code that we used in SolrZooKeeper?

@@ -30,6 +30,7 @@
<Loggers>
<!-- Use <AsyncLogger/<AsyncRoot and <Logger/<Root for asynchronous logging or synchonous logging respectively -->
<Logger name="org.apache.zookeeper" level="WARN"/>
<Logger name="org.apache.zookeeper.PortAssignment" level="INFO"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will go away later.

.configuration(configuration)
.exitHandler(ExitHandler.LOG_ONLY)
.build();
zkse.start();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This really needs ZOOKEEPER-4312.

Copy link
Contributor

Choose a reason for hiding this comment

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

Zookeeper is now on 3.8.0 so this should be possible.

@madrob madrob marked this pull request as draft January 13, 2022 22:32
@@ -104,7 +99,7 @@

private volatile ZKDatabase zkDb;
Copy link

Choose a reason for hiding this comment

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

UnusedVariable: The field 'zkDb' is never read. (details)
(at-me in a reply with help or ignore)

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

Successfully merging this pull request may close these issues.

2 participants