-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Switch default value of Neo4j open session in view #20012
Comments
@michael-simons thanks for the report and such a change for the reason you've described seems appropriate to me. I don't really have an opinion besides the fact that the last option makes it harder to resonate what the default value of the flag is. If we keep a My vote would go for #2. Flagging for team attention to see what the rest of the team thinks. |
Completely agree with you on this one. |
In that case, +1 for changing the default. The pattern's only really of value when it reduces the learning curve of lazy loading problems. Without that problem to solve, it feels like a bad default to me. |
The current default of "open session in view" for Spring Data Neo4j hurts performance in cluster scenarios.
By opening the session on the request, the session will be a general purpose session ("read write") and always go to the leader of a cluster, leaving all followers and read replicas unused. I have written down an analysis of the problem here Spring Data Neo4j, Neo4j-OGM and OSIV.
Neo4j-OGM doesn't have the issue of lazy loading and keeping the session up and running through the request only helps caching inside OGM.
If such a change is unappropriated for 2.3, I would like to see a better warning, for example
Or, the best might even check if one or more
bolt+routing
respectivelyneo4j://
Uris have been configured and than according to that, choose a sane default.So, I basically see three options:
bolt+routing://
orneo4j://
uris or more than onebolt://
URI.I could implement each one of them, but wanted to hear your opinion on that.
The text was updated successfully, but these errors were encountered: