korlov42 commented on a change in pull request #194:
URL: https://github.com/apache/ignite-3/pull/194#discussion_r671033649
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/registry/SchemaRegistryImpl.java
##########
@@ -145,6 +181,7 @@ public void onSchemaDropped(int ver) {
if (ver >= lastVer || ver <= 0 || schemaCache.keySet().first() < ver)
throw new SchemaRegistryException("Incorrect schema version to
clean up to: " + ver);
- schemaCache.remove(ver);
+ if (schemaCache.remove(ver) != null)
+ mappingCache.keySet().stream().filter(k -> (k & 0xFFFFFFFF) ==
ver).forEach(mappingCache::remove);
Review comment:
```suggestion
mappingCache.keySet().removeIf(k -> (k & 0xFFFFFFFFL) == ver);
```
Please note the `L` at the end of the integer literal. Without it cache
won't be cleaned.
--
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]