当使用orientdb图形模型时,是否有一个全局配置来建立所有db写入异步复制到其他节点?
你所需要的是在文件$ORIENTDB_HOME/config/default-distributed-db-config.json。这是默认内容:
{
"replication": true,
"autoDeploy": true,
"hotAlignment": true,
"resyncEvery": 15,
"clusters": {
"internal": {
"replication": false
},
"index": {
"replication": false
},
"*": {
"replication": true,
"readQuorum": 1,
"writeQuorum": 2,
"failureAvailableNodesLessQuorum": false,
"readYourWrites": true,
"partitioning": {
"strategy": "round-robin",
"default": 0,
"partitions": [
[ "<NEW_NODE>" ]
]
}
}
}
}
默认writeQuorum为2。这意味着在将ACK发送到客户端之前,它等待并检查来自至少2个节点的答案。您可以将其设置为1,这样所有的写操作都将是异步的。