eric-maynard commented on code in PR #433:
URL: https://github.com/apache/polaris/pull/433#discussion_r1857262019
##########
polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -1342,24 +1377,45 @@ public void doCommit(TableMetadata base, TableMetadata
metadata) {
TableLikeEntity entity =
TableLikeEntity.of(resolvedEntities == null ? null :
resolvedEntities.getRawLeafEntity());
String existingLocation;
+ int maxMetadataCacheBytes =
+ callContext
+ .getPolarisCallContext()
+ .getConfigurationStore()
+ .getConfiguration(
+ callContext.getPolarisCallContext(),
+ catalogEntity,
+ PolarisConfiguration.METADATA_CACHE_MAX_BYTES);
+ String metadataJson = null;
+ boolean shouldPersistMetadata =
+ switch (maxMetadataCacheBytes) {
+ case
PolarisConfiguration.METADATA_CACHE_MAX_BYTES_INFINITE_CACHING -> true;
+ case PolarisConfiguration.METADATA_CACHE_MAX_BYTES_NO_CACHING ->
false;
+ default -> {
+ metadataJson = TableMetadataParser.toJson(metadata);
Review Comment:
@snazy in this way, the re-serialization only happens when the feature is
enabled
--
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]