如何为异步复制配置orientdb

时间:2014-03-25 22:28:33

标签: replication distributed orientdb

使用orientdb图模型时,是否存在全局配置以建立所有数据库写入以异步复制到其他节点?

1 个答案:

答案 0 :(得分:1)

您需要的只是$ 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,因此所有写入都将是异步的。