rpuch commented on code in PR #7815:
URL: https://github.com/apache/ignite-3/pull/7815#discussion_r2965360472


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/schemacompat/SchemaCompatibilityValidator.java:
##########
@@ -138,14 +141,26 @@ private CompatValidationResult 
validateForwardSchemaCompatibility(
 
         assert !tableSchemas.isEmpty() : "No table schemas for table " + 
tableId + " between " + beginTimestamp + " and " + commitTimestamp;
 
+        int initialSchemaCatalogVersion = tableSchemas.get(0).catalogVersion();
+        int commitSchemaCatalogVersion = tableSchemas.get(tableSchemas.size() 
- 1).catalogVersion();
+
+        return forwardCompatValidationResultCache.computeIfAbsent(
+                new CatalogVersionsSpan(tableId, initialSchemaCatalogVersion, 
commitSchemaCatalogVersion),
+                key -> 
validateForwardSchemaCompatibility(initialSchemaCatalogVersion, tableSchemas)
+        );

Review Comment:
   Not a problem as:
   
   1. DDLs are pretty rare
   2. We are going to cleanup the cache on Catalog compaction
   
   so the proposed complication is not worth it



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