dimas-b commented on code in PR #2029:
URL: https://github.com/apache/polaris/pull/2029#discussion_r2205428779


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCacheKey.java:
##########
@@ -18,118 +18,51 @@
  */
 package org.apache.polaris.core.storage.cache;
 
-import java.util.Objects;
+import jakarta.annotation.Nullable;
 import java.util.Set;
 import org.apache.polaris.core.entity.PolarisEntity;
 import org.apache.polaris.core.entity.PolarisEntityConstants;
+import org.apache.polaris.immutables.PolarisImmutable;
+import org.immutables.value.Value;
 
-public class StorageCredentialCacheKey {
+@PolarisImmutable
+public interface StorageCredentialCacheKey {
 
-  private final String realmId;
-  private final long catalogId;
+  @Value.Parameter(order = 1)
+  String realmId();
 
-  /** The serialized string of the storage config. */
-  private final String storageConfigSerializedStr;
+  @Value.Parameter(order = 2)
+  long catalogId();
 
-  /**
-   * The entity id is passed to be used to fetch subscoped creds, but is not 
used to do hash/equals
-   * as part of the cache key.
-   */

Review Comment:
   I know that this PR does not change this behaviour, but conceptually if the 
entity ID is a substantial parameter to computing the cached value, I believe 
it should be included in the key.



-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to