tarantool의 마스터 - 마스터 복제에 동일한 구성 파일을 사용하려고합니다. 여기에 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()
하지만
tarantoolctl start tester
및 host2의
tarantoolctl start tester
에 host1의
에서 실행할 때이 설정 파일 복제 기능이없는 두 개의 분리 된 tarantool을 만들 발견했다.다음과 같이 host2의 tester.lua를 변경하면 작동합니다.
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:[email protected]:3301','replicator:[email protected]:3301'}
}
동일한 구성 파일을 사용하는 방법이 궁금하십니까?