Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
import static com.linkedin.venice.ConfigKeys.SERVER_QUOTA_ENFORCEMENT_CAPACITY_MULTIPLE;
import static com.linkedin.venice.ConfigKeys.SERVER_QUOTA_ENFORCEMENT_ENABLED;
import static com.linkedin.venice.ConfigKeys.SERVER_QUOTA_ENFORCEMENT_INTERVAL_IN_MILLIS;
import static com.linkedin.venice.ConfigKeys.SERVER_READ_QUOTA_INITIALIZATION_FALLBACK_ENABLED;
import static com.linkedin.venice.ConfigKeys.SERVER_RECORD_LEVEL_METRICS_WHEN_BOOTSTRAPPING_CURRENT_VERSION_ENABLED;
import static com.linkedin.venice.ConfigKeys.SERVER_REMOTE_CONSUMER_CONFIG_PREFIX;
import static com.linkedin.venice.ConfigKeys.SERVER_REMOTE_INGESTION_REPAIR_SLEEP_INTERVAL_SECONDS;
Expand Down Expand Up @@ -691,6 +692,7 @@ public class VeniceServerConfig extends VeniceClusterConfig {

private final boolean parallelResourceShutdownEnabled;
private final int lagMonitorCleanupCycle;
private final boolean readQuotaInitializationFallbackEnabled;

public VeniceServerConfig(VeniceProperties serverProperties) throws ConfigurationException {
this(serverProperties, Collections.emptyMap());
Expand Down Expand Up @@ -1177,6 +1179,8 @@ public VeniceServerConfig(VeniceProperties serverProperties, Map<String, Map<Str
serverProperties.getBoolean(SERVER_PARALLEL_RESOURCE_SHUTDOWN_ENABLED, false);
this.lagMonitorCleanupCycle =
serverProperties.getInt(SERVER_LAG_MONITOR_CLEANUP_CYCLE, DEFAULT_LAG_MONITOR_CLEANUP_CYCLE);
this.readQuotaInitializationFallbackEnabled =
serverProperties.getBoolean(SERVER_READ_QUOTA_INITIALIZATION_FALLBACK_ENABLED, true);
}

List<Double> extractThrottleLimitFactorsFor(VeniceProperties serverProperties, String configKey) {
Expand Down Expand Up @@ -2131,4 +2135,8 @@ public boolean isParallelResourceShutdownEnabled() {
public int getLagMonitorCleanupCycle() {
return lagMonitorCleanupCycle;
}

public boolean isReadQuotaInitializationFallbackEnabled() {
return readQuotaInitializationFallbackEnabled;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3085,4 +3085,11 @@ private ConfigKeys() {
*/
public static final String SYSTEM_STORE_VERSION_RETENTION_COUNT = "store.version.retention.count.system.store";
public static final int DEFAULT_SYSTEM_STORE_VERSION_RETENTION_COUNT = 5;

/**
* Whether storage node read quota will fail-open if CV is unavailable during initialization or it will try to use
* cluster's instance count to calculate a placeholder/fallback value until CV is available.
*/
public static final String SERVER_READ_QUOTA_INITIALIZATION_FALLBACK_ENABLED =
"server.read.quota.initialization.fallback.enabled";
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.linkedin.alpini.netty4.http2.Http2PipelineInitializer;
import com.linkedin.alpini.netty4.ssl.SslInitializer;
import com.linkedin.davinci.config.VeniceServerConfig;
import com.linkedin.davinci.storage.StorageEngineRepository;
import com.linkedin.venice.acl.DynamicAccessController;
import com.linkedin.venice.acl.StaticAccessController;
import com.linkedin.venice.authorization.IdentityParser;
Expand Down Expand Up @@ -77,7 +78,8 @@ public HttpChannelInitializer(
VeniceServerConfig serverConfig,
Optional<StaticAccessController> routerAccessController,
Optional<DynamicAccessController> storeAccessController,
StorageReadRequestHandler requestHandler) {
StorageReadRequestHandler requestHandler,
StorageEngineRepository storageEngineRepository) {
this.serverConfig = serverConfig;
this.requestHandler = requestHandler;
this.isDaVinciClient = serverConfig.isDaVinciClient();
Expand Down Expand Up @@ -146,6 +148,7 @@ public HttpChannelInitializer(
serverConfig,
storeMetadataRepository,
customizedViewRepository,
storageEngineRepository,
nodeId,
quotaUsageStats);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public ListenerService(
serverConfig,
routerAccessController,
storeAccessController,
requestHandler);
requestHandler,
storageEngineRepository);

Class<? extends ServerChannel> serverSocketChannelClass = NioServerSocketChannel.class;
boolean epollEnabled = serverConfig.isRestServiceEpollEnabled();
Expand Down
Loading
Loading