gaborkaszab commented on code in PR #11738: URL: https://github.com/apache/iceberg/pull/11738#discussion_r1878337162
########## core/src/main/java/org/apache/iceberg/CachingCatalog.java: ########## @@ -144,14 +144,16 @@ public Table loadTable(TableIdentifier ident) { return cached; } - if (MetadataTableUtils.hasMetadataTableName(canonicalized)) { + Table table = tableCache.get(canonicalized, catalog::loadTable); + + if (table instanceof BaseMetadataTable) { + // Cache underlying table TableIdentifier originTableIdentifier = TableIdentifier.of(canonicalized.namespace().levels()); Table originTable = tableCache.get(originTableIdentifier, catalog::loadTable); - // share TableOperations instance of origin table for all metadata tables, so that metadata - // table instances are - // also refreshed as well when origin table instance is refreshed. + // Share TableOperations instance of origin table for all metadata tables, so that metadata Review Comment: It's needed to share the underlying TableOperations between the originTable and the metadata table. We basically create another Table object for the table metadata with a different TableOperations and then update the cache with that object. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org