From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 29 Aug 2018 19:31:51 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v2] xlog: add request details to panic message for broken LSN Message-ID: <20180829163151.yiwym5ri6y6kmxjf@esperanza> References: <1535368944-23713-1-git-send-email-ztarvos@gmail.com> <20180827170407.2igpxsf4zprp7vdu@esperanza> <20180828162740.GA11135@localhost.localdomain> <20180829095247.xbrk7euqwnssvl5q@esperanza> <20180829152113.GA3636@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180829152113.GA3636@localhost.localdomain> To: Sergei Kalashnikov Cc: tarantool-patches List-ID: On Wed, Aug 29, 2018 at 06:21:15PM +0300, Sergei Kalashnikov wrote: > > > +dirname = fio.pathjoin(fio.cwd(), "panic") > > > +xlogs = fio.glob(dirname .. "/*.xlog") > > > +fio.unlink(xlogs[#xlogs]) > > > > I don't understand why you need to delete the last xlog here. > > > > This last xlog is always empty, so recovery_scan() skips the vclock_follow() > call and it doesn't panic unless I delete the file. I'm not sure why it gets > created since I didn't create checkpoints in the test explicitly. Later on, the > actual row recovery happens, but recover_xlog() silently skips unordered lsn. OK, I see. We create an empty xlog on shutdown so that we can find out the instance vclock on recovery without rescanning the last xlog. This is needed for replica rebootstrap functionality. Since recover_xlog() doesn't check LSN order, I guess we could drop this test case altogether then - anyway, the primary application of this patch is replication, not local recovery. Well, let's leave it since it's already implemented and works well. Thanks for addressing all my comments. I pushed the patch to 1.10.