Skip to content

Conversation

@ali-ince
Copy link
Contributor

With 4.0 multi-database introduction, it's possible that a database is created on leader and asked for a session against it on other members of the cluster - which may not yet catched up with the database creation.

This PR makes it possible that when the bookmark returned from the CREATE DATABASE query is passed on to the next session that will use the just created, the bookmarks specified for that session will be used by the underlying routing discovery session and we will not hit database not found errors.

API-wise, session.lastBookmark() will always return an array of strings no matter what had been passed when creating the session. Even if no bookmark is specified, an empty array will be returned. There is no change on passing bookmarks from one session to the other, that operation is still carried out the same way.

Based on #476.

@ali-ince ali-ince merged commit 2589eb6 into neo4j:2.0 Aug 27, 2019
@ali-ince ali-ince deleted the 2.0-bookmarks-on-discovery branch August 27, 2019 16:02
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.

1 participant