From 0d994dfc47a1de881d3bda8aca580f43166727b1 Mon Sep 17 00:00:00 2001 From: Arjun Singh Bora Date: Thu, 12 Dec 2024 14:26:52 -0800 Subject: [PATCH] . --- .../controllerapi/ControllerApiConstants.java | 1 - .../controllerapi/UpdateStoreQueryParams.java | 7 ------- .../serialization/avro/AvroProtocolDefinition.java | 2 +- .../venice/controller/VeniceHelixAdmin.java | 6 ++++-- .../avro/AdminOperation/v83/AdminOperation.avsc | 13 ------------- 5 files changed, 5 insertions(+), 24 deletions(-) diff --git a/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/ControllerApiConstants.java b/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/ControllerApiConstants.java index a33f854132..a755a73d9e 100644 --- a/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/ControllerApiConstants.java +++ b/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/ControllerApiConstants.java @@ -255,5 +255,4 @@ public class ControllerApiConstants { public static final String TARGET_SWAP_REGION = "target_swap_region"; public static final String TARGET_SWAP_REGION_WAIT_TIME = "target_swap_region_wait_time"; public static final String IS_DAVINCI_HEARTBEAT_REPORTED = "is_davinci_heartbeat_reported"; - public static final String REAL_TIME_TOPIC_NAME = "real_time_topic_name"; } diff --git a/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/UpdateStoreQueryParams.java b/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/UpdateStoreQueryParams.java index 6eb0a32e8e..4f3b733ccb 100644 --- a/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/UpdateStoreQueryParams.java +++ b/internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/UpdateStoreQueryParams.java @@ -770,13 +770,6 @@ public UpdateStoreQueryParams setIsDavinciHeartbeatReported(boolean isReported) public Optional getIsDavinciHeartbeatReported() { return getBoolean(IS_DAVINCI_HEARTBEAT_REPORTED); - - public UpdateStoreQueryParams setRealTimeTopicName(String realTimeTopicName) { - return putString(REAL_TIME_TOPIC_NAME, realTimeTopicName); - } - - public Optional getRealTimeTopicName() { - return getInteger(REAL_TIME_TOPIC_NAME); } // ***************** above this line are getters and setters ***************** diff --git a/internal/venice-common/src/main/java/com/linkedin/venice/serialization/avro/AvroProtocolDefinition.java b/internal/venice-common/src/main/java/com/linkedin/venice/serialization/avro/AvroProtocolDefinition.java index 4ca9ae4b0a..00c4cefebf 100644 --- a/internal/venice-common/src/main/java/com/linkedin/venice/serialization/avro/AvroProtocolDefinition.java +++ b/internal/venice-common/src/main/java/com/linkedin/venice/serialization/avro/AvroProtocolDefinition.java @@ -72,7 +72,7 @@ public enum AvroProtocolDefinition { * * TODO: Move AdminOperation to venice-common module so that we can properly reference it here. */ - ADMIN_OPERATION(85, SpecificData.get().getSchema(ByteBuffer.class), "AdminOperation"), + ADMIN_OPERATION(84, SpecificData.get().getSchema(ByteBuffer.class), "AdminOperation"), /** * Single chunk of a large multi-chunk value. Just a bunch of bytes. diff --git a/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java b/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java index 8cbe468795..9166b5dbff 100644 --- a/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java +++ b/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java @@ -4842,7 +4842,6 @@ private void internalUpdateStore(String clusterName, String storeName, UpdateSto Optional targetSwapRegion = params.getTargetSwapRegion(); Optional targetSwapRegionWaitTime = params.getTargetRegionSwapWaitTime(); Optional isDavinciHeartbeatReported = params.getIsDavinciHeartbeatReported(); - Optional realTimeTopicName = params.getRealTimeTopicName(); final Optional newHybridStoreConfig; if (hybridRewindSeconds.isPresent() || hybridOffsetLagThreshold.isPresent() || hybridTimeLagThreshold.isPresent() @@ -5150,9 +5149,12 @@ private void internalUpdateStore(String clusterName, String storeName, UpdateSto isDavinciHeartbeatReported.ifPresent(aBool -> storeMetadataUpdate(clusterName, storeName, store -> { store.setIsDavinciHeartbeatReported(aBool); return store; + })); + realTimeTopicName.ifPresent(aString -> storeMetadataUpdate(clusterName, storeName, store -> { ensureRealTimeTopicIsReady(clusterName, pubSubTopicRepository.getTopic(aString)); - store.setRealTimeTopicName(aString); + store.getHybridStoreConfig().setRealTimeTopicName(aString); + return store; })); LOGGER.info("Finished updating store: {} in cluster: {}", storeName, clusterName); diff --git a/services/venice-controller/src/main/resources/avro/AdminOperation/v83/AdminOperation.avsc b/services/venice-controller/src/main/resources/avro/AdminOperation/v83/AdminOperation.avsc index 649ebd7758..732f80b80c 100644 --- a/services/venice-controller/src/main/resources/avro/AdminOperation/v83/AdminOperation.avsc +++ b/services/venice-controller/src/main/resources/avro/AdminOperation/v83/AdminOperation.avsc @@ -289,12 +289,8 @@ "type": "int", "doc": "Policy that will be used during buffer replay. rewindTimeInSeconds defines the delta. 0 => REWIND_FROM_EOP (replay from 'EOP - rewindTimeInSeconds'), 1 => REWIND_FROM_SOP (replay from 'SOP - rewindTimeInSeconds')", "default": 0 -<<<<<<< HEAD }, {"name": "realTimeTopicName", "type": "string", "default": "", "doc": "Name of the real time topic this store/version uses"} -======= - } ->>>>>>> 6d947e9d0 (.) ] } ], @@ -664,15 +660,6 @@ "doc": "How many producers will be used for the nearline producer in Server to improve producing throughput", "type": "int", "default": 1 -<<<<<<< HEAD -======= - }, - { - "name": "realTimeTopicName", - "doc": "Name of the new real time topic, if you want to change partition count or something else. DO NOT RUN THIS, FEATURE IS UNDER DEVELOPMENT!", - "type": "string", - "default": "" ->>>>>>> 6d947e9d0 (.) } ] },