From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 5CD8B45C305 for ; Wed, 16 Dec 2020 00:07:24 +0300 (MSK) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) From: Sergey Ostanevich In-Reply-To: <6968e1d8-5bab-d043-ebeb-fc2bbbdea069@tarantool.org> Date: Wed, 16 Dec 2020 00:07:22 +0300 Content-Transfer-Encoding: 7bit Message-Id: <37DB5DC7-2188-4ECF-8337-19350F9E0D57@tarantool.org> References: <59ffd9dd6c9e895b85f89bfb23d6f8fcbf2c556f.1607696813.git.lvasiliev@tarantool.org> <8e8dff1a-13fe-b64a-14e3-892f69def428@tarantool.org> <6968e1d8-5bab-d043-ebeb-fc2bbbdea069@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 3/3] sql: update temporary file name format List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Vasiliev Cc: m.semkin@corp.mail.ru, Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org Thanks for the patch! As I mentioned in another thread - this one is LGTM. Sergos > On 14 Dec 2020, at 18:54, Leonid Vasiliev wrote: > > Hi! Thank you for the review. > > On 13.12.2020 21:30, Vladislav Shpilevoy wrote: >> Thanks for the patch! >> On 11.12.2020 15:49, Leonid Vasiliev via Tarantool-patches wrote: >>> The bug was consisted in fail when working with temporary files >>> created by VDBE to sort large result of a `SELECT` statement with >>> `ORDER BY`, `GROUP BY` clauses. >>> >>> Whats happen (step by step): >>> - We have two instances on one node (sharded cluster). >>> - A query is created that executes on both. >>> - The first instance creates the name of the temporary file and >>> checks a file with such name on existence. >>> - The second instance creates the name of the temporary file >>> (the same as in first instance) and checks a file with such name >>> on existence. >>> - The first instance creates a file with the `SQL_OPEN_DELETEONCLOSE` >>> flag. >>> - The second instance opens(try to open) the same file. >>> - The first instance closes (and removes) the temporary file. >>> - The second instance tries to work with the file and fails. >>> >>> Why did it happen: >>> The temporary file name format has a random part, but the random >>> generator uses a fixed seed. >>> >>> When it was decided to use a fixed seed: >>> 32cb1ad298b2b55d8536a85bdfb3827c8c8739e1 >> To reference a commit we also usually include commit title in >> ("...") after the hash. > > Changed to: > > When it was decided to use a fixed seed: > 32cb1ad298b2b55d8536a85bdfb3827c8c8739e1 > ("sql: drop useless code from os_unix.c") > >> The patch itself looks good.