From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 432F4445320 for ; Wed, 15 Jul 2020 20:13:05 +0300 (MSK) Date: Wed, 15 Jul 2020 17:13:04 +0000 From: Nikita Pettik Message-ID: <20200715171304.GJ26087@tarantool.org> References: <1594821336-14468-1-git-send-email-alyapunov@tarantool.org> <1594821336-14468-10-git-send-email-alyapunov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1594821336-14468-10-git-send-email-alyapunov@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3 09/13] tmx: introduce prepare sequence number List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov Cc: tarantool-patches@dev.tarantool.org On 15 Jul 16:55, Aleksandr Lyapunov wrote: > Prepare sequence number is a monotonically increasing ID that is > assigned to any prepared transaction. This ID is suitable for > serialization order resolution: the bigger is ID - the latter the > transaction exist in the serialization order of transactions. Nit: exists > Note that id of transactions has quite different order in case > when transaction could yield - an younger (bigger id) transaction > can prepare/commit first (lower psn) while older tx sleeps in vain. > > Also it should be mentioned that LSN has the same order as PSN, > but it has two general differences: > 1. The LSN sequence has no holes, i.e. it is a natural number > sequence. This property is useless for transaction engine. > 2. The LSN sequence is provided by WAL writer and thus LSN is not > available for TX thas was prepared and haven't been committed yet. Nit: thas -> that > That feature makes psn more suitable sequence for transactions as > it allows to order prepared but not committed transaction and > allows, for example, to create a read view between prepared > transactions. > > Part of #4897 > --- LGTM