yuqi1129 opened a new pull request, #13378: URL: https://github.com/apache/gravitino/pull/13378
### What changes were proposed in this pull request? `RelationalEntityStore.exists()` no longer short-circuits on a cache hit; it always asks the backend. Adds `testExistsConsultsBackendEvenOnCacheHit`. ### Why are the changes needed? A per-node cache can hold an entity that another node already dropped until the change log is replayed. `exists()` returned `true` on such a stale hit without consulting the backend, and its callers (`CatalogManager`, `ManagedSchemaOperations`, `TagManager`, `PolicyManager`) use it to reject creates with `AlreadyExistsException`, so the staleness surfaced as a wrong error. A miss already fell through to the backend, so the short-circuit only ever saved one indexed query. Item 4 of #12377. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New unit test; `./gradlew :core:test --tests 'org.apache.gravitino.storage.relational.TestRelationalEntityStore*' --tests 'org.apache.gravitino.storage.relational.TestEntityCache*' -PskipITs` (32 tests green). -- 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]
