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

Use system database when retrieving routing table #138

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

2hdddg
Copy link
Contributor

@2hdddg 2hdddg commented Aug 27, 2020

fix #137

// The query should run in system database, preserve current setting and restore it when
// done.
originalDatabaseName := b.databaseName
b.databaseName = "system"

Choose a reason for hiding this comment

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

Shouldn't this be the passed in variable database?

The routing table will be different for each database, so I don't think just system is the right call here. I guess we need to something like:

b.databaseName = database with the added deferred func to restore the previous one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

b.databaseName is the database that is used to execute within, there is a parameter to getRoutingTable that is set to database, that is we query for routing for "database" in "system"
It would be great if you could verify it with your setup. I'm working on another patch to include in the release.

@2hdddg 2hdddg merged commit f634f1f into neo4j:1.8 Aug 28, 2020
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.

Unable to retrieve routing table for user 'x' when user 'x' have no permission to default database
2 participants