From: Alexander Turenko <alexander.turenko@tarantool.org> To: Alexandr Barulev <huston.mavr@gmail.com> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v2] fio: fix race condition in mktree Date: Mon, 13 Jan 2020 18:44:50 +0300 [thread overview] Message-ID: <20200113154450.u2zvncitbmbflvuu@tkn_work_nb> (raw) In-Reply-To: <20200113122854.GH31304@tarantool.org> Added the comment to the code: diff --git a/src/lua/fio.lua b/src/lua/fio.lua index c9aeac951..4692e1026 100644 --- a/src/lua/fio.lua +++ b/src/lua/fio.lua @@ -364,6 +364,10 @@ fio.mktree = function(path, mode) local stat = fio.stat(current_dir) if stat == nil then local st, err = fio.mkdir(current_dir, mode) + -- fio.stat() and fio.mkdir() above are separate calls + -- and a file system may be changed between them. So + -- if the error here is due to an existing directory, + -- the function should not report an error. if err ~= nil and not fio.path.is_dir(current_dir) then return false, string.format("Error creating directory %s: %s", current_dir, tostring(err)) Pushed to master, 2.3, 2.2 and 1.10. > > Related to https://github.com/tarantool/doc/issues/1063 > > Side note: you can mention the ticket from other repo queue the > following way: > | Relates to tarantool/doc#1063 Don't sure I would prefer this way: a link is simpler for me. I left it as an https link.
prev parent reply other threads:[~2020-01-13 15:44 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-13 12:14 HustonMmmavr 2020-01-13 12:28 ` Igor Munkin 2020-01-13 15:44 ` Alexander Turenko [this message]
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=20200113154450.u2zvncitbmbflvuu@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=huston.mavr@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2] fio: fix race condition in mktree' \ /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