尝试使用 orientdb 和 orientjs 完成交易时收到错误消息。这是错误:
2015-10-21 15:48:33:868 FINE [node1442848110394] Distributed transaction: locked record #12:19 in database 'MyDb' owned by server 'node1442848110394' [OHazelcastDistributedDatabase]
2015-10-21 15:48:33:868 FINE [node1442848110394] Distributed transaction: cannot lock record #12:19 in database 'MyDb' owned by server 'node1442848110394' [OHazelcastDistributedDatabase]
2015-10-21 15:48:33:868 FINE [node1442848110394] Distributed transaction: unlocked record #12:19 in database 'MyDb' [OHazelcastDistributedDatabase]
2015-10-21 15:48:33:869 FINE [node1442848110394] sending back response 'com.orientechnologies.orient.server.distributed.task.ODistributedRecordLockedException' to request 28 (tx) [ODistributedWorker]Error on transaction commit
com.orientechnologies.orient.server.distributed.task.ODistributedRecordLockedException
at com.orientechnologies.orient.server.distributed.task.OTxTask.execute(OTxTask.java:104)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOnLocalNode(OHazelcastPlugin.java:797)
at com.orientechnologies.orient.server.hazelcast.ODistributedWorker.onMessage(ODistributedWorker.java:296)
at com.orientechnologies.orient.server.hazelcast.ODistributedWorker.run(ODistributedWorker.java:119)
这是我的节点代码:
var document = {.....} //some object
db.let('document',function(s) {
s.insert().into(self.tableName).set(document);
})
.let('userToDocumentEdge',function(s) {
s
.create('edge', 'E')
.from("#12:19")
.to('$document');
})
.commit()
.return('$document')
.one();
我已经能够完成其他交易(不是上面的代码)并且存在#12:19。
我们在单个 linux 实例上运行 ./dserver。
有任何想法吗?