Skip to content

Commit 6c32331

Browse files
committed
Only using one default.max.record.size.bytes config setting for both controller and server config. 🔐
1 parent 1a24d1b commit 6c32331

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

clients/da-vinci-client/src/main/java/com/linkedin/davinci/config/VeniceServerConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import static com.linkedin.venice.ConfigKeys.DATA_BASE_PATH;
88
import static com.linkedin.venice.ConfigKeys.DAVINCI_P2P_BLOB_TRANSFER_CLIENT_PORT;
99
import static com.linkedin.venice.ConfigKeys.DAVINCI_P2P_BLOB_TRANSFER_SERVER_PORT;
10+
import static com.linkedin.venice.ConfigKeys.DEFAULT_MAX_RECORD_SIZE_BYTES;
1011
import static com.linkedin.venice.ConfigKeys.DIV_PRODUCER_STATE_MAX_AGE_MS;
1112
import static com.linkedin.venice.ConfigKeys.ENABLE_GRPC_READ_SERVER;
1213
import static com.linkedin.venice.ConfigKeys.ENABLE_SERVER_ALLOW_LIST;
@@ -58,7 +59,6 @@
5859
import static com.linkedin.venice.ConfigKeys.SERVER_DEDICATED_CONSUMER_POOL_FOR_AA_WC_LEADER_ENABLED;
5960
import static com.linkedin.venice.ConfigKeys.SERVER_DEDICATED_CONSUMER_POOL_SIZE_FOR_AA_WC_LEADER;
6061
import static com.linkedin.venice.ConfigKeys.SERVER_DEDICATED_DRAINER_FOR_SORTED_INPUT_ENABLED;
61-
import static com.linkedin.venice.ConfigKeys.SERVER_DEFAULT_MAX_RECORD_SIZE_BYTES;
6262
import static com.linkedin.venice.ConfigKeys.SERVER_DISK_FULL_THRESHOLD;
6363
import static com.linkedin.venice.ConfigKeys.SERVER_DISK_HEALTH_CHECK_INTERVAL_IN_SECONDS;
6464
import static com.linkedin.venice.ConfigKeys.SERVER_DISK_HEALTH_CHECK_SERVICE_ENABLED;
@@ -782,10 +782,10 @@ public VeniceServerConfig(VeniceProperties serverProperties, Map<String, Map<Str
782782
recordLevelMetricWhenBootstrappingCurrentVersionEnabled =
783783
serverProperties.getBoolean(SERVER_RECORD_LEVEL_METRICS_WHEN_BOOTSTRAPPING_CURRENT_VERSION_ENABLED, true);
784784
identityParserClassName = serverProperties.getString(IDENTITY_PARSER_CLASS, DefaultIdentityParser.class.getName());
785-
defaultMaxRecordSizeBytes = serverProperties.getInt(SERVER_DEFAULT_MAX_RECORD_SIZE_BYTES, 100 * BYTES_PER_MB);
785+
defaultMaxRecordSizeBytes = serverProperties.getInt(DEFAULT_MAX_RECORD_SIZE_BYTES, 100 * BYTES_PER_MB);
786786
if (defaultMaxRecordSizeBytes < BYTES_PER_MB) {
787787
throw new VeniceException(
788-
SERVER_DEFAULT_MAX_RECORD_SIZE_BYTES + ": " + defaultMaxRecordSizeBytes + " must be at least "
788+
DEFAULT_MAX_RECORD_SIZE_BYTES + ": " + defaultMaxRecordSizeBytes + " must be at least "
789789
+ generateHumanReadableByteCountString(BYTES_PER_MB));
790790
}
791791
}

internal/venice-common/src/main/java/com/linkedin/venice/ConfigKeys.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,16 +2081,11 @@ private ConfigKeys() {
20812081
"controller.dangling.topic.occurrence.threshold.for.cleanup";
20822082

20832083
/**
2084-
* Controller config for the default value of {@link com.linkedin.venice.writer.VeniceWriter#maxRecordSizeBytes}.
2085-
* Only used in batch push jobs.
2084+
* Config for the default value which is filled in when the store-level config
2085+
* {@link com.linkedin.venice.writer.VeniceWriter#maxRecordSizeBytes} is left unset. Used as a controller config for
2086+
* batch push jobs. Used as a server config for nearline jobs / partial updates.
20862087
*/
2087-
public static final String CONTROLLER_DEFAULT_MAX_RECORD_SIZE_BYTES = "controller.default.max.record.size.bytes";
2088-
2089-
/**
2090-
* Server config for the default value of {@link com.linkedin.venice.writer.VeniceWriter#maxRecordSizeBytes}.
2091-
* Only used in partial updates.
2092-
*/
2093-
public static final String SERVER_DEFAULT_MAX_RECORD_SIZE_BYTES = "server.default.max.record.size.bytes";
2088+
public static final String DEFAULT_MAX_RECORD_SIZE_BYTES = "default.max.record.size.bytes";
20942089

20952090
/**g
20962091
* Percentage of total single get requests that are allowed for retry in decimal. e.g. 0.1 would mean up to 10% of the

internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/controller/server/TestAdminSparkServer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ public void setUp() {
9999
extraProperties.put(
100100
ConfigKeys.TOPIC_CLEANUP_SLEEP_INTERVAL_BETWEEN_TOPIC_LIST_FETCH_MS,
101101
Long.toString(TimeUnit.DAYS.toMillis(7)));
102-
extraProperties
103-
.put(ConfigKeys.CONTROLLER_DEFAULT_MAX_RECORD_SIZE_BYTES, Integer.toString(TEST_MAX_RECORD_SIZE_BYTES));
102+
extraProperties.put(ConfigKeys.DEFAULT_MAX_RECORD_SIZE_BYTES, Integer.toString(TEST_MAX_RECORD_SIZE_BYTES));
104103
extraProperties.put(ConfigKeys.MIN_NUMBER_OF_UNUSED_KAFKA_TOPICS_TO_PRESERVE, Integer.toString(1));
105104
super.setUp(false, Optional.empty(), extraProperties);
106105
}

services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceControllerClusterConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import static com.linkedin.venice.ConfigKeys.CONTROLLER_CLUSTER_ZK_ADDRESSS;
3838
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DANGLING_TOPIC_CLEAN_UP_INTERVAL_SECOND;
3939
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DANGLING_TOPIC_OCCURRENCE_THRESHOLD_FOR_CLEANUP;
40-
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DEFAULT_MAX_RECORD_SIZE_BYTES;
4140
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DEFAULT_READ_QUOTA_PER_ROUTER;
4241
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DISABLED_REPLICA_ENABLER_INTERVAL_MS;
4342
import static com.linkedin.venice.ConfigKeys.CONTROLLER_DISABLED_ROUTES;
@@ -75,6 +74,7 @@
7574
import static com.linkedin.venice.ConfigKeys.DAVINCI_PUSH_STATUS_SCAN_NO_REPORT_RETRY_MAX_ATTEMPTS;
7675
import static com.linkedin.venice.ConfigKeys.DAVINCI_PUSH_STATUS_SCAN_THREAD_NUMBER;
7776
import static com.linkedin.venice.ConfigKeys.DEFAULT_MAX_NUMBER_OF_PARTITIONS;
77+
import static com.linkedin.venice.ConfigKeys.DEFAULT_MAX_RECORD_SIZE_BYTES;
7878
import static com.linkedin.venice.ConfigKeys.DEFAULT_NUMBER_OF_PARTITION;
7979
import static com.linkedin.venice.ConfigKeys.DEFAULT_NUMBER_OF_PARTITION_FOR_HYBRID;
8080
import static com.linkedin.venice.ConfigKeys.DEFAULT_OFFLINE_PUSH_STRATEGY;
@@ -609,7 +609,7 @@ public VeniceControllerClusterConfig(VeniceProperties props) {
609609
props.getBoolean(CONTROLLER_DISABLE_PARENT_REQUEST_TOPIC_FOR_STREAM_PUSHES, false);
610610
this.defaultReadQuotaPerRouter =
611611
props.getInt(CONTROLLER_DEFAULT_READ_QUOTA_PER_ROUTER, DEFAULT_PER_ROUTER_READ_QUOTA);
612-
this.defaultMaxRecordSizeBytes = props.getInt(CONTROLLER_DEFAULT_MAX_RECORD_SIZE_BYTES, 100 * BYTES_PER_MB);
612+
this.defaultMaxRecordSizeBytes = props.getInt(DEFAULT_MAX_RECORD_SIZE_BYTES, 100 * BYTES_PER_MB);
613613
if (defaultMaxRecordSizeBytes < BYTES_PER_MB) {
614614
throw new VeniceException(
615615
"Default max record size must be at least " + generateHumanReadableByteCountString(BYTES_PER_MB));

0 commit comments

Comments
 (0)