final ORecordId oldRID = rid.copy(); final OCluster cluster = getClusterById(rid.getClusterId()); final OPhysicalPosition ppos = cluster.allocatePosition(ORecordInternal.getRecordType(rec)); rid.setClusterPosition(ppos.clusterPosition); clientTx.updateIdentityAfterCommit(oldRID, rid); final OPhysicalPosition ppos = cluster.allocatePosition(ORecordInternal.getRecordType(rec)); if (ppos.clusterPosition != rid.getClusterPosition()) { throw new OConcurrentCreateException(rid, new ORecordId(rid.getClusterId(), ppos.clusterPosition));
OPhysicalPosition physicalPosition = cluster.allocatePosition(ORecordInternal.getRecordType(rec)); assert atomicOperation.getCounter() == 1; rid.setClusterId(cluster.getId()); physicalPosition = cluster.allocatePosition(ORecordInternal.getRecordType(rec)); assert atomicOperation.getCounter() == 1;