简体   繁体   English

为什么在baasbox DbHelper.java中将事务逻辑注释掉?

[英]Why is transaction logic commented out in baasbox DbHelper.java?

I have been working with baasbox lately and was wondering why has the transaction logic been commented out in the baasbox DbHelper.java file. 我最近一直在使用baasbox,并且想知道为什么在baasbox DbHelper.java文件中注释了事务逻辑。

public static void commitTransaction(){
    ODatabaseRecordTx db = getConnection();
    if (isInTransaction()){
        if (Logger.isTraceEnabled()) Logger.trace("Commit transaction");
        //db.commit();
    }
}

Check here for the complete code: https://github.com/baasbox/baasbox/blob/master/app/com/baasbox/db/DbHelper.java 在此处检查完整的代码: https : //github.com/baasbox/baasbox/blob/master/app/com/baasbox/db/DbHelper.java

Other orientdb transaction logic is also commented out, like db.begin() and db.rollback(). 其他的orientdb事务逻辑也被注释掉,例如db.begin()和db.rollback()。

Wouldn't functions like delete(ORid) in NodeDao.java absolutely require this transaction logic? NodeDao.java中的delete(ORid)之类的功能是否绝对需要此事务逻辑? If yes, then how is it working correctly currently? 如果是,那么它目前如何正常工作?

Can someone provide any thoughts on this? 有人可以对此提供任何想法吗?

Full disclosure: I'm a BaasBox engineer. 全面披露:我是BaasBox工程师。

The BaasBox project started when OrientDB was very young and transactions management was painful. BaasBox项目在OrientDB很小的时候就开始了,并且事务管理很痛苦。 We created helper methods to easily support transactions in the future. 我们创建了辅助方法来轻松支持将来的交易。 We then shifted our focus on features, performance and responsiveness. 然后,我们将注意力转移到功能,性能和响应能力上。

In the near future we have in our roadmap to upgrade the DB engine to OrientDB 1.7.x that has better transactions support and other interesting features, so we plan to "reactivate" the transaction logic as soon as possible, consistently with other priorities. 在不远的将来,我们将在路线图中将DB引擎升级到具有更好的事务支持和其他有趣功能的OrientDB 1.7.x,因此我们计划与其他优先级保持一致,尽快“重新激活”事务逻辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM