You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bookmark separator sequence of BS can appear within a normal bookmark string, causing a bookmark string to be split in half erroneously.
Expected Behavior
Transaction should follow causal chain established by the bookmark.
Current Behavior
Bookmark inter
Bookmarks returned from Neo4j with the following format work just fine:
FB:kcwQ1ap/pGGeSZC7gxLjSLCYq8kBQ5A=
Bookmarks returned from Neo4j with the following format will fail:
FB:kcwQ1ap/pGGeSZC7gxLjSLCYq8kBSpA=
These transactions will fail with an error message similar to:
Could not open Neo4j Session for transaction; nested exception is org.neo4j.driver.exceptions.ClientException: Supplied bookmarks 'pA=' does not conform to pattern {database_id}:{tx_id}.
The failing bookmark has the character sequence “BS” contained within it. By co-incidence, this is the same character sequence used by the bolt driver as a “Bookmark Separator” – which is used to combine and then split multiple bookmarks (BoltDriver.java line 409, in the method bookmarksFromStrings(…)).
This means that a single bookmark that contains the two letters “BS” is erroneously split in half – causing an invalid bookmark to be sent to the database, resulting in the observed error.
Set up a test application using bookmarks to establish a causal chain.
On receipt of a bookmark, use that bookmark for subsequent transaction.
Through repeated testing, a failure can be observed.
Possible Resolutions
Option 1: Use a Bookmark Separator that cannot be contained within a genuine bookmark.
Option 2: Escape/un-escape any occurrence of the Bookmark Separator when combining/splitting bookmarks
The text was updated successfully, but these errors were encountered:
Bookmark separator sequence of
BS
can appear within a normal bookmark string, causing a bookmark string to be split in half erroneously.Expected Behavior
Transaction should follow causal chain established by the bookmark.
Current Behavior
Bookmark inter
Bookmarks returned from Neo4j with the following format work just fine:
Bookmarks returned from Neo4j with the following format will fail:
These transactions will fail with an error message similar to:
The failing bookmark has the character sequence “BS” contained within it. By co-incidence, this is the same character sequence used by the bolt driver as a “Bookmark Separator” – which is used to combine and then split multiple bookmarks (BoltDriver.java line 409, in the method
bookmarksFromStrings(…)
).This means that a single bookmark that contains the two letters “BS” is erroneously split in half – causing an invalid bookmark to be sent to the database, resulting in the observed error.
Environment
Database: Neo4J 4.2.3
Bolt Driver: neo4j-ogm-bolt-driver:3.2.24
Steps to Reproduce
Set up a test application using bookmarks to establish a causal chain.
On receipt of a bookmark, use that bookmark for subsequent transaction.
Through repeated testing, a failure can be observed.
Possible Resolutions
Option 1: Use a Bookmark Separator that cannot be contained within a genuine bookmark.
Option 2: Escape/un-escape any occurrence of the Bookmark Separator when combining/splitting bookmarks
The text was updated successfully, but these errors were encountered: