tustvold commented on code in PR #3781:
URL: https://github.com/apache/arrow-rs/pull/3781#discussion_r1121699814
##########
object_store/src/local.rs:
##########
@@ -282,28 +290,10 @@ impl ObjectStore for LocalFileSystem {
) -> Result<(MultipartId, Box<dyn AsyncWrite + Unpin + Send>)> {
let dest = self.config.path_to_filesystem(location)?;
- // Generate an id in case of concurrent writes
- let mut multipart_id = 1;
-
- // Will write to a temporary path
- let staging_path = loop {
- let staging_path = get_upload_stage_path(&dest,
&multipart_id.to_string());
-
- match std::fs::metadata(&staging_path) {
Review Comment:
This has a TOCTOU thread race, which is fixed by using create_new instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]