Tarantool development patches archive
 help / color / mirror / Atom feed
From: Leonid Vasiliev <lvasiliev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	imeevma@tarantool.org, korablev@tarantool.org,
	sergos@tarantool.org, m.semkin@corp.mail.ru
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 3/3] sql: update temporary file name format
Date: Mon, 14 Dec 2020 18:54:00 +0300	[thread overview]
Message-ID: <6968e1d8-5bab-d043-ebeb-fc2bbbdea069@tarantool.org> (raw)
In-Reply-To: <8e8dff1a-13fe-b64a-14e3-892f69def428@tarantool.org>

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.
> 

  reply	other threads:[~2020-12-14 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 14:49 [Tarantool-patches] [PATCH v2 0/3] Fix working with temporary files in VDBE Leonid Vasiliev
2020-12-11 14:49 ` [Tarantool-patches] [PATCH v2 1/3] sql: add missing diag_set on failure when working with files inside SQL module Leonid Vasiliev
2020-12-13 18:30   ` Vladislav Shpilevoy
2020-12-14 15:49     ` Leonid Vasiliev
2020-12-15 20:29       ` Sergey Ostanevich
2020-12-15 22:12   ` Vladislav Shpilevoy
2020-12-16 23:17     ` Leonid Vasiliev
2020-12-11 14:49 ` [Tarantool-patches] [PATCH v2 2/3] sql: set an error to diag in sql_execute() on failure Leonid Vasiliev
2020-12-11 15:03   ` Nikita Pettik
2020-12-11 15:40     ` Leonid Vasiliev
2020-12-13 18:30   ` Vladislav Shpilevoy
2020-12-14 15:52     ` Leonid Vasiliev
2020-12-15 21:05       ` Sergey Ostanevich
2020-12-11 14:49 ` [Tarantool-patches] [PATCH v2 3/3] sql: update temporary file name format Leonid Vasiliev
2020-12-13 18:30   ` Vladislav Shpilevoy
2020-12-14 15:54     ` Leonid Vasiliev [this message]
2020-12-15 21:07       ` Sergey Ostanevich
2020-12-16 14:47       ` Nikita Pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6968e1d8-5bab-d043-ebeb-fc2bbbdea069@tarantool.org \
    --to=lvasiliev@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=m.semkin@corp.mail.ru \
    --cc=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 3/3] sql: update temporary file name format' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox