snazy commented on code in PR #2022: URL: https://github.com/apache/polaris/pull/2022#discussion_r2204915049
########## runtime/service/src/main/java/org/apache/polaris/service/quarkus/storage/QuarkusStorageCredentialCacheConfig.java: ########## @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.polaris.service.quarkus.storage; + +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; +import io.smallrye.config.WithName; +import jakarta.validation.constraints.Min; +import org.apache.polaris.core.storage.cache.StorageCredentialCacheConfig; + +@ConfigMapping(prefix = "polaris.storage-credential-cache") +public interface QuarkusStorageCredentialCacheConfig extends StorageCredentialCacheConfig { + @WithName("max-entry-count") + @WithDefault("10000") + @Min(0) Review Comment: Shouldn't this be 1? ########## polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCache.java: ########## @@ -50,13 +50,10 @@ public class StorageCredentialCache { private static final long CACHE_MAX_NUMBER_OF_ENTRIES = 10_000L; private final LoadingCache<StorageCredentialCacheKey, StorageCredentialCacheEntry> cache; - private final RealmContext realmContext; private final PolarisConfigurationStore configurationStore; /** Initialize the creds cache */ - public StorageCredentialCache( - RealmContext realmContext, PolarisConfigurationStore configurationStore) { - this.realmContext = realmContext; + public StorageCredentialCache(PolarisConfigurationStore configurationStore) { this.configurationStore = configurationStore; cache = Caffeine.newBuilder() Review Comment: > InMemoryEntityCache I was thinking about that one, too. And I suspect it should be refactored in a similar way. -- 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