snazy commented on code in PR #1339:
URL: https://github.com/apache/polaris/pull/1339#discussion_r2035456985
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/cache/EntityCache.java:
##########
@@ -365,50 +230,46 @@ && isNewer(existingCacheEntry, existingCacheEntryByName))
{
long entityCatalogId,
long entityId,
PolarisEntityType entityType) {
-
- // if it exists, we are set
- ResolvedPolarisEntity entry = this.getEntityById(entityId);
- final boolean cacheHit;
-
- // we need to load it if it does not exist
- if (entry == null) {
- // this is a miss
- cacheHit = false;
-
- // load it
- ResolvedEntityResult result =
- polarisMetaStoreManager.loadResolvedEntityById(
- callContext, entityCatalogId, entityId, entityType);
-
- // not found, exit
- if (!result.isSuccess()) {
- return null;
- }
-
- // if found, setup entry
- callContext.getDiagServices().checkNotNull(result.getEntity(),
"entity_should_loaded");
- callContext
- .getDiagServices()
- .checkNotNull(result.getEntityGrantRecords(),
"entity_grant_records_should_loaded");
- entry =
- new ResolvedPolarisEntity(
- callContext.getDiagServices(),
- result.getEntity(),
- result.getEntityGrantRecords(),
- result.getGrantRecordsVersion());
-
- // the above loading could take a long time so check again if the entry
exists and only
- this.cacheNewEntry(entry);
+ final AtomicBoolean cacheHit = new AtomicBoolean(true);
Review Comment:
Nope. That's why it's a "nit".
--
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]