From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5DD4F430407 for ; Tue, 11 Aug 2020 10:53:23 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id z14so12493743ljm.1 for ; Tue, 11 Aug 2020 00:53:23 -0700 (PDT) Date: Tue, 11 Aug 2020 10:53:20 +0300 From: Cyrill Gorcunov Message-ID: <20200811075320.GA2074@grain> References: <6fc5876bfde067f19973a5d701b55bf4826f2a9e.1597097775.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6fc5876bfde067f19973a5d701b55bf4826f2a9e.1597097775.git.v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/1] box: snapshot should not include rolled back data List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Tue, Aug 11, 2020 at 12:18:05AM +0200, Vladislav Shpilevoy wrote: > Box.snapshot() could include rolled back data in case synchronous > transaction ROLLBACK arrived during WAL rotation in preparation of > a checkpoint. > > More specifically, snapshot consists of fixating the engines' > content (creation of a read-view), doing WAL rotation, and writing > the snapshot itself. All data changes after content fixation won't > go into the snap. So if ROLLBACK arrives during WAL rotation, the > fixated content will have rolled back data, not present in the > newest dataset. > > The patch makes it fail if during WAL rotation anything was rolled > back. The bug sometimes appeared in an existing test about qsync > snapshots, but with a very poor reproducibility. In a new test > file it is reproduced 100% without the patch. > > Closes #5167 Ack. Lets give it a shot.