{"record":{"id":"437c4d29ccabff54","repo":"apache/iceberg","slug":"table-does-not-have-a-uuid-this-may-cause-issu","errorCode":null,"errorMessage":"Table {} does not have a UUID, this may cause issues with commit coordination on table replace","messagePattern":"Table (.+?) does not have a UUID, this may cause issues with commit coordination on table replace","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriterFactory.java","lineNumber":74,"sourceCode":"\n  RecordWriter createWriter(String tableName, SinkRecord sample, boolean ignoreMissingTable) {\n    TableIdentifier identifier = TableIdentifier.parse(tableName);\n    Table table;\n    try {\n      table = catalog.loadTable(identifier);\n    } catch (NoSuchTableException nst) {\n      if (config.autoCreateEnabled()) {\n        table = autoCreateTable(tableName, sample);\n      } else if (ignoreMissingTable) {\n        return new NoOpWriter();\n      } else {\n        throw nst;\n      }\n    }\n\n    UUID tableUuid = table.uuid();\n    if (tableUuid == null) {\n      LOG.warn(\n          \"Table {} does not have a UUID, this may cause issues with commit coordination on table replace\",\n          identifier);\n    }\n    TableReference tableReference = TableReference.of(catalog.name(), identifier, tableUuid);\n\n    return new IcebergWriter(table, tableReference, config);\n  }\n\n  @VisibleForTesting\n  Table autoCreateTable(String tableName, SinkRecord sample) {\n    StructType structType;\n    if (sample.valueSchema() == null) {\n      Type type = SchemaUtils.inferIcebergType(sample.value(), config);\n      if (type == null) {\n        throw new DataException(\"Unable to create table from empty object\");\n      }\n      structType = type.asStructType();\n    } else {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriterFactory.java#L56-L92","documentation":"IcebergWriterFactory.createWriter logs a warning when table.uuid() returns null, meaning the catalog could not supply a stable table UUID. The UUID is used to build a TableReference that lets Kafka Connect's commit coordination detect when a table was replaced/renamed between writes; without it, a table replace can go undetected and commits may target the wrong table metadata.","triggerScenarios":"Instantiating an IcebergWriter via createWriter against a catalog whose Table implementation does not expose a UUID (e.g. custom or older catalog implementations, or tables resolved through wrappers that drop the uuid field).","commonSituations":"Using a custom Catalog implementation that does not set the uuid in its TableMetadata; serializing/deserializing Table objects that lose the uuid; older Iceberg catalog builds where uuid was optional.","solutions":["Upgrade the catalog implementation/Iceberg version so TableMetadata carries a UUID","Check why table.uuid() is null for your catalog — ensure the catalog returns real TableMetadata, not a wrapped/stubbed Table","If the warning is benign (commits never span table replaces), suppress or ignore it and monitor for misdirected commits","Set the table's uuid explicitly by rewriting table metadata with the current Iceberg core writer"],"exampleFix":"// before\nTable table = customCatalog.loadTable(identifier);\nreturn new IcebergWriter(table, TableReference.of(catalog.name(), identifier, table.uuid()), config);\n// after\n// use a catalog that supplies uuid, e.g. HiveCatalog/HadoopCatalog upgraded to a version that populates TableMetadata.uuid","handlingStrategy":"validation","validationCode":"if (table.uuid() == null) { LOG.warn(\"table {} has no uuid; commit coordination on replace will be unreliable\", identifier); }","typeGuard":"boolean hasUuid(Table t) { return t.uuid() != null; }","tryCatchPattern":null,"preventionTips":["Use catalogs that populate TableMetadata.uuid","Pin a recent Iceberg version on both writer and catalog","Log/monitor TableReference uuid presence in production"],"tags":["kafka-connect","commit-coordination","catalog","uuid"],"backgroundTag":"null-argument","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}