From: "Konstantin Belyavskiy" <k.belyavskiy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov@tarantool.org, georgy@tarantool.org Subject: Re: [tarantool-patches] Re: [PATCH] replication: fix bug with zero replication_connect_quorum Date: Fri, 06 Apr 2018 16:02:37 +0300 [thread overview] Message-ID: <1523019757.404038529@f360.i.mail.ru> (raw) In-Reply-To: <20180406084946.GA4214@atlas> [-- Attachment #1: Type: text/plain, Size: 1900 bytes --] >Пятница, 6 апреля 2018, 11:49 +03:00 от Konstantin Osipov <kostja@tarantool.org>: > >* Konstantin Belyavskiy < k.belyavskiy@tarantool.org > [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. Done, the aim here was to make one port busy to make sure, that no other tarantool instance use it. But here was an error due to this port was socket based. Update this code and transfer found port to replica script as a third parameter. >> +++ 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. OK, it was "copy exactly" principle, just reuse same value. >> + 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 > Best regards, Konstantin Belyavskiy k.belyavskiy@tarantool.org [-- Attachment #2: Type: text/html, Size: 3063 bytes --]
next prev parent reply other threads:[~2018-04-06 13:02 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-06 8:39 Konstantin Belyavskiy 2018-04-06 8:49 ` [tarantool-patches] " Konstantin Osipov 2018-04-06 13:02 ` Konstantin Belyavskiy [this message] 2018-04-07 14:55 ` Vladimir Davydov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1523019757.404038529@f360.i.mail.ru \ --to=k.belyavskiy@tarantool.org \ --cc=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov@tarantool.org \ --subject='Re: [tarantool-patches] Re: [PATCH] replication: fix bug with zero replication_connect_quorum' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox