我正在尝试使用相同的配置文件进行 tarantool 的主-主复制。这是 host1 和 host2 的 tester.lua。
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:password@host1:3301','replicator:password@host2: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
我发现这个配置文件创建了两个没有复制功能的独立 tarantool。
如果我如下更改 host2 的 tester.lua,它就可以工作。
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:password@host1:3301','replicator:password@host2:3301'}
}
我想知道如何使用相同的配置文件?