Skip to content

Remove duplicate enterprise startup logic #114

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

SpecialThing44
Copy link
Contributor

  • As far as I can tell, this is a duplicate of the logic in org.neo4j.server.enterprise.EnterpriseNeoServer#start. which calls createDbFactory function.

- As far as I can tell, this is a duplicate of the logic in
  org.neo4j.server.enterprise.EnterpriseNeoServer#start.
  which calls createDbFactory function.
Copy link
Contributor

@bradnussbaum bradnussbaum left a comment

Choose a reason for hiding this comment

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

I'm not following the logic on why this is duplicate startup logic. How do OpenEnterpriseCoreGraphDatabase and OpenEnterpriseReadReplicaGraphDatabase get initialized based on the CORE/READ_REPLICA mode?

@SpecialThing44
Copy link
Contributor Author

See the implementation of createDbFactory in OpenEnterpriseNeoServer, which is already the default call on the switch statement in EnterpriseNeoServer.
That implementation covers all of the cases that the code I am removing covers, unless I am missing something.

@bradnussbaum
Copy link
Contributor

This will need to be investigated further as EnterpriseNeoServer.createDbFactory handles the mode for CORE and READ_REPLICA differently than OpenEnterpriseNeoServer.createDbFactory by initializing OpenEnterpriseCoreGraphDatabase and OpenEnterpriseReadReplicaGraphDatabase which extend CoreGraphDatabase and ReadReplicaGraphDatabase but have different construction. So it's not exactly the same. Now it might be possible to simplify but I don't think we can just change it without further considerations.

@SpecialThing44
Copy link
Contributor Author

I see it now :)

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