{"record":{"id":"6a9ea61a606d473e","repo":"apache/seatunnel","slug":"dropping-table-s-exception","errorCode":null,"errorMessage":"Dropping table %s exception.","messagePattern":"Dropping table (.+?) exception\\.","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java","lineNumber":265,"sourceCode":"        }\n    }\n\n    @Override\n    public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)\n            throws TableNotExistException, CatalogException {\n        if (!tableExists(tablePath)) {\n            if (ignoreIfNotExists) {\n                return;\n            } else {\n                throw new TableNotExistException(catalogName, tablePath);\n            }\n        }\n\n        Path path = new Path(inferTablePath(tableParentDfsPathStr, tablePath));\n        try {\n            this.fs.delete(path, true);\n        } catch (IOException e) {\n            throw new CatalogException(String.format(\"Dropping table %s exception.\", tablePath), e);\n        }\n    }\n\n    @Override\n    public void truncateTable(TablePath tablePath, boolean ignoreIfNotExists)\n            throws TableNotExistException, CatalogException {\n        throw new UnsupportedOperationException(\"Hudi catalog not support truncate table.\");\n    }\n\n    @Override\n    public void createDatabase(TablePath tablePath, boolean ignoreIfExists)\n            throws DatabaseAlreadyExistException, CatalogException {\n        if (databaseExists(tablePath.getDatabaseName())) {\n            if (ignoreIfExists) {\n                return;\n            } else {\n                throw new DatabaseAlreadyExistException(catalogName, tablePath.getDatabaseName());\n            }","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java#L247-L283","documentation":"Thrown by HudiCatalog.dropTable when recursively deleting the table's HDFS/storage path (fs.delete) fails with an IOException, after existence checks already passed. It wraps the filesystem-level deletion error, not a catalog lookup failure.","triggerScenarios":"Calling dropTable on an existing table when fs.delete(path, true) throws IOException: permission denied, HDFS/s3 outage, or files locked/being written by a running job.","commonSituations":"Connector user lacks delete permission on the table directory; concurrent SeaTunnel/Hudi job still writing to the table; cloud storage eventual-consistency or throttling errors.","solutions":["Stop any jobs writing to the table, then retry the drop.","Grant the connector user delete permission on the table path.","Delete the path manually with hadoop fs -rm -r if the connector account cannot.","Check the wrapped IOException cause for the concrete storage error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Java\nPath p = new Path(tablePathPath);\nFileSystem fs = p.getFileSystem(conf);\nif (!fs.exists(p)) { /* nothing to drop */ }\n// check writability: fs.exists only proves read; deletes need write perms on parent","typeGuard":null,"tryCatchPattern":"// Java\ntry {\n    catalog.dropTable(tablePath, false);\n} catch (CatalogException e) {\n    if (e.getCause() instanceof IOException) {\n        // stop writers, verify permissions, then retry\n    }\n    throw e;\n}","preventionTips":["Ensure no jobs are writing to the table while dropping it.","Grant the connector user delete permission on the table directory.","Retry drops after transient cloud-storage throttling.","Fall back to hadoop fs -rm -r with an admin account if needed."],"tags":["hadoop","filesystem","delete","io"],"backgroundTag":"file-write-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}