diff --git a/indexer/services/bazooka/src/index.ts b/indexer/services/bazooka/src/index.ts index 3703fc1853..91d691ecb3 100644 --- a/indexer/services/bazooka/src/index.ts +++ b/indexer/services/bazooka/src/index.ts @@ -234,41 +234,11 @@ async function createKafkaTopics( }); } -<<<<<<< HEAD -======= -async function partitionKafkaTopics(): Promise { - for (const kafkaTopic of KAFKA_TOPICS) { - const topicMetadata: { topics: Array } = await admin.fetchTopicMetadata({ - topics: [kafkaTopic], - }); - if (topicMetadata.topics.length === 1) { - if (topicMetadata.topics[0].partitions.length !== KAFKA_TOPICS_TO_PARTITIONS[kafkaTopic]) { - logger.info({ - at: 'index#partitionKafkaTopics', - message: `Setting topic ${kafkaTopic} to ${KAFKA_TOPICS_TO_PARTITIONS[kafkaTopic]} partitions`, - }); - await admin.createPartitions({ - validateOnly: false, - topicPartitions: [{ - topic: kafkaTopic, - count: KAFKA_TOPICS_TO_PARTITIONS[kafkaTopic], - }], - }); - logger.info({ - at: 'index#partitionKafkaTopics', - message: `Successfully set topic ${kafkaTopic} to ${KAFKA_TOPICS_TO_PARTITIONS[kafkaTopic]} partitions`, - }); - } - } - } -} - ->>>>>>> 0788d298 (Fix bug in clearing topics (#2202)) async function clearKafkaTopics( existingKafkaTopics: string[], ): Promise { await Promise.all( - _.map(KAFKA_TOPICS, + _.map(KAFKA_TOPICS_TO_PARTITIONS, clearKafkaTopic.bind(null, 1, config.CLEAR_KAFKA_TOPIC_RETRY_MS,