From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 6 Apr 2018 11:49:46 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH] replication: fix bug with zero replication_connect_quorum Message-ID: <20180406084946.GA4214@atlas> References: <20180406083945.16921-1-k.belyavskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180406083945.16921-1-k.belyavskiy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov@tarantool.org, georgy@tarantool.org List-ID: * Konstantin Belyavskiy [18/04/06 11:40]: > +socket = require('socket') > +--- > +... > +s = socket.tcp_server('localhost', 3371, function() end) Is it possible to avoid using a specific port? The port may be already in use for a thousand of reasons, and this will break the test. > +++ b/test/replication/replica_params.lua > @@ -0,0 +1,21 @@ > +#!/usr/bin/env tarantool > + > +local quorum = tonumber(arg[1]) > +local n_replics = tonumber(arg[2]) > +listen = os.getenv("LISTEN") > +-- Test different replicaset configurations: > +-- First, when the only address in the replicaset is itself. > +repl = {listen} > +-- To test situation with second master unavailable, add > +-- second address (should be empty). > +if n_replics == 2 then repl = { listen, '127.0.0.1:3371' } end > + > +box.cfg({ > + listen = listen, > + replication = repl, > + memtx_memory = 107374182, Why? What's magical about this number? Could you use 100 * 1024 * 1024 instead? Then it's clear the test is not using too much memory and the exact amount is also clearly visible. > + replication_connect_quorum = quorum, > + replication_connect_timeout = 0.1, > +}) > + > +require('console').listen(os.getenv('ADMIN')) Thanks, -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov