roryqi commented on code in PR #14482:
URL: https://github.com/apache/gravitino/pull/14482#discussion_r4465129008
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java:
##########
@@ -319,18 +319,52 @@ public TableMetadata loadTableMetadata(TableIdentifier
tableIdentifier) {
return ((BaseTable)
getCatalog().loadTable(tableIdentifier)).operations().current();
}
+ /**
+ * Last metadata parsed on this thread by {@link
#loadTableMetadataFromLocation(String)}. Kept so
+ * register-table authorization, schema validation, and overwrite UUID
checks can share one FileIO
+ * read of the same location within a request.
+ */
+ private static final ThreadLocal<CachedTableMetadata> CACHED_TABLE_METADATA
= new ThreadLocal<>();
Review Comment:
Is it necessary to involve this fix? I know this is the review from AI. But
it makes code complex. Could revert this change.
--
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]