clolov commented on code in PR #16653: URL: https://github.com/apache/kafka/pull/16653#discussion_r1688070411
########## storage/src/test/java/org/apache/kafka/tiered/storage/integration/DisableRemoteLogOnTopicTest.java: ########## @@ -0,0 +1,121 @@ +/* + * 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.kafka.tiered.storage.integration; + +import org.apache.kafka.common.config.TopicConfig; +import org.apache.kafka.tiered.storage.TieredStorageTestBuilder; +import org.apache.kafka.tiered.storage.TieredStorageTestHarness; +import org.apache.kafka.tiered.storage.specs.KeyValueSpec; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.apache.kafka.common.utils.Utils.mkEntry; +import static org.apache.kafka.common.utils.Utils.mkMap; +import static org.apache.kafka.server.log.remote.storage.LocalTieredStorageEvent.EventType.DELETE_SEGMENT; + +public final class DisableRemoteLogOnTopicTest extends TieredStorageTestHarness { + + @Override + public int brokerCount() { + return 2; + } + + @ParameterizedTest(name = "{displayName}.quorum={0}") + @ValueSource(strings = {"kraft"}) + public void executeTieredStorageTest(String quorum) { + super.executeTieredStorageTest(quorum); + } + + @Override + protected void writeTestSpecifications(TieredStorageTestBuilder builder) { Review Comment: I am quite happy with this test, but I am more worried about a scenario where we archive, disable with delete, and then reenable - I would want to assert that a) we cannot access the data before the delete and b) archival + reading of latest archived data still works ########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -470,7 +479,8 @@ public void onLeadershipChange(Set<Partition> partitionsBecomeLeader, * @param errorHandler callback to handle any errors while stopping the partitions. */ public void stopPartitions(Set<StopPartition> stopPartitions, - BiConsumer<TopicPartition, Throwable> errorHandler) { + BiConsumer<TopicPartition, Throwable> errorHandler, + String remoteLogDisablePolicy) { Review Comment: I think what Kamal meant is that there could be partitions for **multiple tiered topics** given as part of the stopPartitions set and we cannot make the assumption that the disable policy will be the same for all of them. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org