2017-04-06 5 views
0

私は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'} 
}             

どのように同じ設定ファイルを使用するのだろうか?

答えて

0

レプリケーション以降、レプリケーションに同じ設定を使用することはできません。個別のレプリケーション設定が必要です。 - それは動的複製

https://github.com/dedok/tarantool-on-edison/blob/master/examples/security-system/in_device.lua#L28を設定している - それは静的複製

を構成している私は、このヘルプを願っています

https://github.com/dedok/tarantool-on-edison/blob/master/examples/security-system/in_cloud.lua#L75:ここ

は例MMの複製は(私は、この機能を設定するには、この方法のように)であります。

関連する問題