Skip to content

Conversation

@lutovich
Copy link
Contributor

Previously it was possible to only supply a single bookmark when creating a new session. However there is a use-case to be able to supply multiple bookmarks when multiple concurrent tasks execute write queries and then reader should be able to observe all those writes. To achieve this driver now allows passing an array of bookmarks to Driver#session() function.

Driver will now send:

{
    bookmark: "max",
    bookmarks: ["one", "two", "max"]
}

instead of simple:

{
    bookmark: "max"
}

this is done to maintain backwards compatibility with databases that only support a single bookmark. It forces driver to parse and compare bookmarks which violates the fact that bookmarks are opaque. This is done only to maintain backwards compatibility and should not be copied. Code doing this will eventually be removed.

Related Bolt server PR: neo4j/neo4j#9404

Previously it was possible to only supply a single bookmark when creating a
new session. However there is a use-case to be able to supply multiple
bookmarks when multiple concurrent tasks execute write queries and then
reader should be able to observe all those writes. To achieve this
driver now allows passing an array of bookmarks to `Driver#session()`
function.

Driver will now send:
```
{
    bookmark: "max",
    bookmarks: ["one", "two", "max"]
}
```
instead of simple:
```
{
    bookmark: "max"
}
```

this is done to maintain backwards compatibility with databases that only
support a single bookmark. It forces driver to parse and compare bookmarks
which violates the fact that bookmarks are opaque. This is done only to
maintain backwards compatibility and should not be copied. Code doing
this will eventually be removed.

Related Bolt server PR: neo4j/neo4j#9404
@lutovich lutovich force-pushed the 1.4-multiple-bookmarks branch from 98ac8d5 to 79cf7da Compare June 21, 2017 14:05
@lutovich lutovich merged commit b0ccd38 into neo4j:1.4 Jun 21, 2017
@lutovich lutovich deleted the 1.4-multiple-bookmarks branch June 21, 2017 14:57
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