JingsongLi commented on code in PR #1465:
URL: https://github.com/apache/paimon-rust/pull/1465#discussion_r4662314822


##########
crates/paimon/src/table/data_file_writer.rs:
##########
@@ -317,7 +317,6 @@ impl DataFileWriter {
             .new_file_name(&self.data_file_prefix, &self.file_format);
         let location = self.paths.new_path(&file_name)?;
         let bucket_dir = location.parent();
-        self.file_io.mkdirs(&format!("{bucket_dir}/")).await?;

Review Comment:
   I reran the original strict-provider reproduction on the current head 
`b285e577` merged into `main` (`86cd12c7`). The first append to the fresh 
`pt=a%2Fb/bucket-0` still fails with `Data file parent must exist`. The new 
default is `true`, but `resolve_for_write` calls `self.resolve(path)` before 
checking it. A provider that needs the directory before resolving the child 
Parquet path returns early, so its `create_dir` is never reached.
   
   Please resolve and create the logical parent before resolving the file for 
providers that require it, or keep the conditional `mkdirs` before opening the 
file in both data writers. The local HTTP S3 probe passed for append and 
primary-key files and observed no directory-marker PUTs, so the fast path is 
working.
   
   Keeping the check at the data-writer boundary also avoids a separate I/O 
regression. With the documented `SharedStorage` S3 provider, 
`ConsumerManager::reset` already creates `consumer/` before writing its 
checkpoint. Applying the new default in every `OutputFile` writer repeats the 
marker PUT for that metadata write. The current OpenDAL S3 operator implements 
`create_dir` as a marker write, so this changes the reset path from two PUTs to 
three for existing providers.



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

Reply via email to