我正在尝试对tarantool的master-master复制使用相同的配置文件。下面是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'}
} 我想知道如何使用相同的配置文件?
发布于 2017-04-24 22:43:44
由于复制,您不能对复制使用相同的配置。您必须有单独的复制配置。
以下是M-M复制的示例(我喜欢以这种方式配置此功能):
https://github.com/dedok/tarantool-on-edison/blob/master/examples/security-system/in_cloud.lua#L75 -它已动态配置复制
https://github.com/dedok/tarantool-on-edison/blob/master/examples/security-system/in_device.lua#L28 -它具有静态配置的复制
我希望这能有所帮助。
https://stackoverflow.com/questions/43266774
复制相似问题