pvary commented on code in PR #13340:
URL: https://github.com/apache/iceberg/pull/13340#discussion_r2161174498


##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableMetadataCache.java:
##########
@@ -220,37 +238,59 @@ SchemaInfo getSchemaInfo() {
    */
   static class SchemaInfo {
     private final Map<Integer, Schema> schemas;
-    private final Map<Schema, Tuple2<Schema, CompareSchemasVisitor.Result>> 
lastResults;
+    private final Cache<Schema, SchemaCompareInfo> lastResults;

Review Comment:
   I have tested when I implemented this feature, and the Cache added 
considerable amount of delay in handling records on the hot path. @mxm might 
sill have some numbers on his Slack. IIRC it was actually slower than 
calculating again the `CompareSchemasVisitor.Result`.
   
   Please check the results of `TestDynamicIcebergSinkPerf.java`. There might 
be some recent changes which has changed the situation, but I did move to `Map` 
intentionally from `Cache` to optimize the write throughput.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to