This is an automated email from the ASF dual-hosted git repository.

yufei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 415c9c0d9 Core: resolveAll() must be called before reading resolution 
results (#3064)
415c9c0d9 is described below

commit 415c9c0d9dfcfc50365f48d09392aee49cb54c51
Author: Yufei Gu <[email protected]>
AuthorDate: Thu Nov 20 11:39:39 2025 -0800

    Core: resolveAll() must be called before reading resolution results (#3064)
---
 .../persistence/resolver/PolarisResolutionManifest.java    | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/PolarisResolutionManifest.java
 
b/polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/PolarisResolutionManifest.java
index 1b9c26e02..4f38758db 100644
--- 
a/polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/PolarisResolutionManifest.java
+++ 
b/polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/PolarisResolutionManifest.java
@@ -68,6 +68,14 @@ public class PolarisResolutionManifest implements 
PolarisResolutionManifestCatal
   // Set when resolveAll is called
   private ResolverStatus primaryResolverStatus = null;
 
+  private boolean isResolveAllSucceeded() {
+    diagnostics.checkNotNull(
+        primaryResolverStatus,
+        "resolver_not_run_before_access",
+        "resolveAll() must be called before reading resolution results");
+    return primaryResolverStatus.getStatus() == 
ResolverStatus.StatusEnum.SUCCESS;
+  }
+
   public PolarisResolutionManifest(
       PolarisDiagnostics diagnostics,
       RealmContext realmContext,
@@ -256,7 +264,7 @@ public class PolarisResolutionManifest implements 
PolarisResolutionManifestCatal
   }
 
   private @Nullable ResolvedPolarisEntity getResolvedRootContainerEntity() {
-    if (primaryResolverStatus.getStatus() != 
ResolverStatus.StatusEnum.SUCCESS) {
+    if (!isResolveAllSucceeded()) {
       return null;
     }
     ResolvedPolarisEntity resolvedEntity =
@@ -327,7 +335,7 @@ public class PolarisResolutionManifest implements 
PolarisResolutionManifestCatal
         key,
         pathLookup);
 
-    if (primaryResolverStatus.getStatus() != 
ResolverStatus.StatusEnum.SUCCESS) {
+    if (!isResolveAllSucceeded()) {
       return null;
     }
     int index = pathLookup.get(key);
@@ -394,7 +402,7 @@ public class PolarisResolutionManifest implements 
PolarisResolutionManifestCatal
         entityType,
         addedTopLevelNames);
 
-    if (primaryResolverStatus.getStatus() != 
ResolverStatus.StatusEnum.SUCCESS) {
+    if (!isResolveAllSucceeded()) {
       return null;
     }
 

Reply via email to