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

Incorrect write query routing in cluster #13419

Open
JorgenEvens opened this issue Mar 13, 2024 · 2 comments
Open

Incorrect write query routing in cluster #13419

JorgenEvens opened this issue Mar 13, 2024 · 2 comments
Labels

Comments

@JorgenEvens
Copy link

JorgenEvens commented Mar 13, 2024

  • Neo4j version: 5.15.0
  • Operating system: minikube 1.32.0 (Debian 11)
  • API/Driver: helm chart, neo4j browser
  • Steps to reproduce
    • Start up a completely new, 3 node cluster using the helm charts.
    • Connect to the neo4j browser using the -lb-neo4j loadbalancer
    • Create a new database with create database mytest
    • Attempt to create a new node, resulting in the Neo.ClientError.Cluster.NotALeader error
    • Check the routing table using call dbms.cluster.routing.getRoutingTable({ database: 'mytest' })
    • And compare the write instance to that shown in the output of show database mytest
  • Expected behavior
    • Creating a new node does not throw the Neo.ClientError.Cluster.NotALeader error
    • The output of the routing table is in agreement with the output of show database.
  • Actual behavior
    • The database is not writable
    • The routing table identifies the wrong cluster node as the writable instance

image

Debug logs of the three nodes:
neo4j-persona-0-0_debug.log
neo4j-persona-1-0_debug.log
neo4j-persona-2-0_debug.log

@JorgenEvens
Copy link
Author

I couldn't find a definitive answer in the documentation, but it seems that routing does not take place when using the bolt protocol, not even when the routing is expected to take place on the server.

When using the neo4j:// protocol the reported issue does not occur. If server side routing is not intended to work with the bolt:// protocol this issue can be closed.

@ikwattro
Copy link
Contributor

ikwattro commented Mar 14, 2024

@JorgenEvens Correct, server-side routing is not performed when using the bolt scheme.

Neo4j Drivers can only use server-side routing when the neo4j:// URI scheme is used. The Drivers do not perform any routing when the bolt:// URI scheme is used, instead connecting directly to the specified host.

You can find more information here https://neo4j.com/docs/operations-manual/current/clustering/setup/routing/#clustering-routing

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

No branches or pull requests

2 participants