I am building an application that needs to execute lots of Cypher statements against Neo4j. I execute these statements in 10K batches and commit them, however I often run into an error:
Supplied bookmark does not conform to pattern neo4j:bookmark:v1:tx
I am not sure what to do about it and I don't know why it is occurring. Here is the snippet of code that is executing the statements:
with driver.session() as session: # _batch_statements just yields batches of 10K cypher statements from the list statements for batch in _batch_statements(statements): with session.begin_transaction() as tx: for statement in batch: tx.run(statement) tx.commit()
Anyone have any ideas as to why this would happen? any potential solutions?
Solved! Go to Solution.
Looking at the neo4j debug log and comparing it to my application's log this error seems to coincide with the errors above:
ERROR [o.n.b.r.DefaultBoltConnection] Protocol breach detected in bolt session 'bolt-0'. Message 'ROLLBACK' cannot be handled by a session in the READY state.
org.neo4j.bolt.runtime.BoltProtocolBreachFatality: Message 'ROLLBACK' cannot be handled by a session in the READY state.
Sorry for the delayed response! I am leaning toward a driver compatibility issue as well. Ran the tool again on the laptop with the same version of Neo4j as the server and it all executed as expected. Looks like I will need to be updating my tool to work with the 4.0 driver soon. Thanks all!