From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 15 Oct 2018 13:22:06 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v2 1/2] box: added replication_dead/rw_gap options Message-ID: <20181015102206.zu2xka4u2aj5d5x7@esperanza> References: <20181012194557.7445-1-arkholga@tarantool.org> <20181012194557.7445-2-arkholga@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181012194557.7445-2-arkholga@tarantool.org> To: Olga Arkhangelskaia Cc: tarantool-patches@freelists.org List-ID: On Fri, Oct 12, 2018 at 10:45:56PM +0300, Olga Arkhangelskaia wrote: > In scope of gh-3110 we need options that store periods of time, > to be compared with time of last activity of relay and applier. > This patch introduces replication_dead_gap and replication_rw_gap options. > > replication_dead_gap is configured in box.cfg, with default 0 value. > If time that passed from now till last reader/writer activity of given replica > exceeds replication_dead_gap value, replica is suspected to be dead. > replication_dead_gap is measured in hours. > > replication_rw_gap is configured in box.cfg, with default 0 value. > If time difference between last reader activity and last writer activity of > given replica exceeds replication_rw_gap value, replica is suspected to be dead. > replication_rw_gap is measured in hours. Why would you even need these configuration options? Why can't you simply pass these parameters as function arguments? Anyway, we typically configure a timeout in seconds, not in hours, and use TIMEOUT_INFINITY for infinite timeout, not 0.