hortonworks / registry

Schema Registry
Apache License 2.0
15 stars 8 forks source link

Schema Registry Client does not update its cache when a schema version deleted #796

Closed nattilabalint closed 1 year ago

nattilabalint commented 1 year ago

When the test

@Test public void testAddAfterDeleteSchemaVersion() executed 2 times in the same JVM, the 2nd run will fail with 404 schema not found at an assert calling

SchemaVersionInfo actualLatestSchemaVersionInfo = schemaRegistryClient.getLatestSchemaVersionInfo(schemaName);

This is because the test does:

create a schema metadata add a version to this delete this version add the same version again But at the next run (when the DB was reset) when it add a version, actually it never goes to the DB because it was found in the cache.