KiteSoar commented on code in PR #17831:
URL: https://github.com/apache/hudi/pull/17831#discussion_r2684683928
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/HoodieSparkLanceWriter.java:
##########
@@ -151,13 +154,20 @@ protected void populateVectorSchemaRoot(List<InternalRow>
records) {
/**
* Check if writer can accept more records based on file size.
- * Uses filesystem-based size checking (similar to ORC/HFile approach).
+ * Checks the actual file size on storage and compares against the
configured threshold.
*
* @return true if writer can accept more records, false if file size limit
reached
*/
public boolean canWrite() {
- //TODO https://github.com/apache/hudi/issues/17684
- return true;
+ try {
+ if (!storage.exists(path)) {
Review Comment:
Is your concern that querying HoodieStorage for `exists(path)` /
`getPathInfo(path)` is not reliable while LanceFileWriter is still writing,so
canWrite() effectively never returns false in practice?
--
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]