You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/23 18:31:59 UTC

[GitHub] [kafka] hachikuji opened a new pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

hachikuji opened a new pull request #11118:
URL: https://github.com/apache/kafka/pull/11118


   This patch fixes `BrokerMetadataPublisher.findGhostReplicas` (renamed to `findStrayPartitions`) so that it returns the stray partitions. Previously it was returning the non-stray partitions.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] cmccabe commented on a change in pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

Posted by GitBox <gi...@apache.org>.
cmccabe commented on a change in pull request #11118:
URL: https://github.com/apache/kafka/pull/11118#discussion_r675850704



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -259,7 +259,7 @@ class Log(@volatile var logStartOffset: Long,
 
   import kafka.log.Log._
 
-  this.logIdent = s"[Log partition=$topicPartition, dir=$parentDir] "
+  this.logIdent = s"[Log partition=$topicPartition, dir=${parentDir}${topicId.map(id => s", topicId=$id").getOrElse("")}] "

Review comment:
       It seems like topicID will almost always be set to the empty string here, since _topicId is (often?) not initialized until these lines below:
   ```
     locally {
       initializePartitionMetadata()
       updateLogStartOffset(logStartOffset)
       maybeIncrementFirstUnstableOffset()
       initializeTopicId()
     }
   ```
   This might be better in a separate PR?




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mumrah commented on a change in pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11118:
URL: https://github.com/apache/kafka/pull/11118#discussion_r675854879



##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -2220,7 +2220,7 @@ class ReplicaManager(val config: KafkaConfig,
     replicaFetcherManager.addFetcherForPartitions(partitionsToMakeFollower)
   }
 
-  def deleteGhostReplicas(topicPartitions: Iterable[TopicPartition]): Unit = {
+  def deleteStrayReplicas(topicPartitions: Iterable[TopicPartition]): Unit = {

Review comment:
       Error logs below still refer to "ghost" partitions. 👻 




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] cmccabe commented on a change in pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

Posted by GitBox <gi...@apache.org>.
cmccabe commented on a change in pull request #11118:
URL: https://github.com/apache/kafka/pull/11118#discussion_r675851515



##########
File path: core/src/test/scala/unit/kafka/server/AbstractApiVersionsRequestTest.scala
##########
@@ -24,10 +24,13 @@ import org.apache.kafka.common.protocol.ApiKeys
 import org.apache.kafka.common.requests.{ApiVersionsRequest, ApiVersionsResponse, RequestUtils}
 import org.apache.kafka.common.utils.Utils
 import org.junit.jupiter.api.Assertions._
-
 import java.util.Properties
+
+import org.junit.jupiter.api.Tag

Review comment:
       Why is this jupiter include in its own section, and not with the other jupiter includes?




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji commented on a change in pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

Posted by GitBox <gi...@apache.org>.
hachikuji commented on a change in pull request #11118:
URL: https://github.com/apache/kafka/pull/11118#discussion_r675860717



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -259,7 +259,7 @@ class Log(@volatile var logStartOffset: Long,
 
   import kafka.log.Log._
 
-  this.logIdent = s"[Log partition=$topicPartition, dir=$parentDir] "
+  this.logIdent = s"[Log partition=$topicPartition, dir=${parentDir}${topicId.map(id => s", topicId=$id").getOrElse("")}] "

Review comment:
       Yeah, fair enough. Will pull this out for now. I'll keep the `toString` change though.




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] cmccabe merged pull request #11118: KAFKA-13127; Fix stray topic partition deletion for kraft

Posted by GitBox <gi...@apache.org>.
cmccabe merged pull request #11118:
URL: https://github.com/apache/kafka/pull/11118


   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org