您可能会注意到tx.commit()与运行tx.success=True和tx.close()是一样的。这样做的问题是,调用commit()只会在连接的流中附加一个COMMIT加密消息,据我所知,它不会验证事务是否成功。在阅读了手册的第18节之后,我发现因为我没有显式地使用结果,所以没有保证语句被处理,因为库使用了延迟加载(仅在需要时才检索结果)
mysqlTransactionManager.commit(transactionStatus); transactionManager.commit(neo4jTransactionStatus); return obj; } catch (Throwable throwable) { mysqlTransactionManager.rollback(transactionStatus); transactionManager.rollback(neo4jTransactionStatus); System.err.println("multiTransaction fail:"+ throwable); thro...
Performance improvement when saving lots of nodes and relationships in the same transaction. Ensure RelationshipEntities not referenced by NodeEntities can be loaded. Fixes #309. Documentation improvements. 2.1.1 Fixes issue where session.loadAll would sort by ids instead of by the sort order specifi...
A transaction in 4.0 can only be committed OR rolled back once. If a transaction is not committed explicitly using ITransaction#Commit, ITransaction#Dispose will roll back the transaction. Statement has been renamed to Query. IStatementResult has been simplified to IResult. Similarly, IStatement...
At the end of the transaction scope, if all went well, the commit will be automatically performed, if there are unhandled exceptions the rollback is performed. You can also manually perfom the rollback using the given parametertxby callingtx.rollback(). ...
public void accept( Transaction transaction ) { transaction.success(); // We also call close() here, because some validations and checks don't run until commit transaction.close(); } }; 代码示例来源:origin: neo4j/neo4j @Test public void testMultipleDeleteNode() { Node node1 = getGraphDb...
This is for the case when a backup/restore has occurred but the restore is to a point in time before an active CDC subscriber. Their current change ID would have a transaction ID ahead of the restored DB but subsequent transaction would have a commit timestamps that is before the new cha...
The bug lived in the closed-source components of neo4j, which is why only the test scenario made it into the publicly visible commit. The fix missed 4.0.3, but will be included in the 4.0.4 patch release, and will be visible in the changelog. ...
Commit 80db437 updates the documentation for the current best known fix. srbaker closed this as completed Dec 14, 2015 bivas commented Dec 15, 2015 Can you specify the CAP to add instead of running in privileged mode? Contributor srbaker commented Dec 16, 2015 Unfortunately, cap-add doe...
self._active_transaction = None self._database_name = DEFAULT_DATABASE if database_name == "" else database_name # The database name can be provided through the url or the config if database_name == "": if hasattr(config, "DATABASE_NAME") and config.DATABASE_NAME: self._database...