wangzhigang1999 opened a new issue, #9916:
URL: https://github.com/apache/paimon/issues/9916

   ### Search before asking
   
   - [x] I searched in the issues and found nothing similar.
   
   ### Paimon version
   
   master, commit `56561540f88a224991f86a3212a357857d1e31f9`
   
   ### Compute Engine
   
   PyPaimon, Python 3.12.6 / PyArrow 19.0.1, local filesystem.
   
   ### Minimal reproduce step
   
   1. Create a Parquet table with data evolution and row tracking enabled.
   2. Write one row through `DataVectorWriter` or `DedicatedFormatWriter`.
   3. During `prepare_commit()`, inject an `OSError` from 
`file_io.get_file_size()` after confirming that the output file exists.
   4. Inspect the table directory after `prepare_commit()` raises the error. 
The newly written Parquet file remains.
   
   Both writers write the normal data file before returning its `DataFileMeta`. 
If reading the file size fails, the caller receives no metadata and cannot 
track the file for cleanup.
   
   ### What doesn't meet your expectations?
   
   The writer should remove the current output file when it fails before 
returning the file metadata. Instead, it leaves an unreferenced file in the 
table directory.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


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