私はtarantoolのmaster-master複製に同じ設定ファイルを使用しようとしています。ここにhost1とhost2のテスター.luaがあります。master-masterのtarantool複製設定の初期スクリプトは適切ですか?
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:[email protected]:3301','replicator:[email protected]:3301'}
}
box.schema.space.create('tester',{id=512, if_not_exists=true})
box.schema.user.grant('guest', 'read,write,execute', 'universe')
s=box.space.tester
s:create_index('primary',{type='tree',parts={1,'unsigned'}})
box.schema.user.create('replicator',{password='password'})
box.schema.user.grant('replicator','execute','role','replication')
box.snapshot()
しかし、私はHOST1
tarantoolctl start tester
とhost2の
tarantoolctl start tester
上で実行した場合、私は、この設定ファイルは、レプリケーション機能せずに分離した2つtarantoolを作成しました。
host2のtester.luaを次のように変更すると動作します。
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:[email protected]:3301','replicator:[email protected]:3301'}
}
どのように同じ設定ファイルを使用するのだろうか?