eric-maynard commented on code in PR #458:
URL: https://github.com/apache/polaris/pull/458#discussion_r1849317616


##########
polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -1254,6 +1255,9 @@ public void doRefresh() {
     public void doCommit(TableMetadata base, TableMetadata metadata) {
       LOGGER.debug(
           "doCommit for table {} with base {}, metadata {}", tableIdentifier, 
base, metadata);
+      LOGGER.info(
+          "doCommit full new metadata: {}",
+          PolarisObjectMapperUtil.serialize(getCurrentPolarisContext(), 
metadata));

Review Comment:
   > Move to DEBUG (still performs serialization, does nothing for people who 
run in INFO+ which should be common)
   
   Good callout. Man do I miss scala.
   
   In this case, perhaps we can do something like:
   
   ```java
         LOGGER.info(
             "doCommit full new metadata: {}",
             () -> 
PolarisObjectMapperUtil.serialize(getCurrentPolarisContext(), metadata));
   ```
   
   SLF4J 2.0 [supports](https://slf4j.org/manual.html#fluent) this, and in 
general it might be a useful wrapper for us.
   
   Having said all of that, I'm less worried about the serde overhead, since we 
do so much metadata/property serde anyway, and more about emitting a huge blob 
into the logs. Particularly the INFO logs which should stay high-signal.
   



-- 
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]

Reply via email to