kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elvar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-2231) Deleting a topic fails
Date Thu, 01 Oct 2015 15:15:27 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939951#comment-14939951
] 

Elvar commented on KAFKA-2231:
------------------------------

Running into this same issue

In the Kafka console I can see the error

{code}
[2015-10-01 15:07:58,530] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions
[test,0] (kafka.server.ReplicaFetcherManager)
[2015-10-01 15:07:58,531] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions
[test,0] (kafka.server.ReplicaFetcherManager)
[2015-10-01 15:07:58,535] INFO Deleting index C:\tmp\kafka-logs\test-0\00000000000000000000.index
(kafka.log.OffsetIndex)
[2015-10-01 15:07:58,537] ERROR [KafkaApi-0] error when handling request Name: StopReplicaRequest;
Version: 0; CorrelationId: 14; ClientId: ; DeletePartitions: true; ControllerId: 0; ControllerEpoch:
2; Partitions: [test,0] (kafka.server.KafkaApis)
kafka.common.KafkaStorageException: Delete of index 00000000000000000000.index failed.
        at kafka.log.LogSegment.delete(LogSegment.scala:283)
        at kafka.log.Log$$anonfun$delete$1.apply(Log.scala:618)
        at kafka.log.Log$$anonfun$delete$1.apply(Log.scala:618)
        at scala.collection.Iterator$class.foreach(Iterator.scala:727)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
        at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
        at kafka.log.Log.delete(Log.scala:618)
        at kafka.log.LogManager.deleteLog(LogManager.scala:378)
        at kafka.cluster.Partition$$anonfun$delete$1.apply$mcV$sp(Partition.scala:143)
        at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:138)
        at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:138)
        at kafka.utils.Utils$.inLock(Utils.scala:535)
        at kafka.utils.Utils$.inWriteLock(Utils.scala:543)
        at kafka.cluster.Partition.delete(Partition.scala:138)
        at kafka.server.ReplicaManager.stopReplica(ReplicaManager.scala:150)
        at kafka.server.ReplicaManager$$anonfun$stopReplicas$3.apply(ReplicaManager.scala:183)
        at kafka.server.ReplicaManager$$anonfun$stopReplicas$3.apply(ReplicaManager.scala:182)
        at scala.collection.immutable.Set$Set1.foreach(Set.scala:74)
        at kafka.server.ReplicaManager.stopReplicas(ReplicaManager.scala:182)
        at kafka.server.KafkaApis.handleStopReplicaRequest(KafkaApis.scala:135)
        at kafka.server.KafkaApis.handle(KafkaApis.scala:64)
        at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:59)
        at java.lang.Thread.run(Thread.java:745)
[2015-10-01 15:07:58,545] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions
[test,0] (kafka.server.ReplicaFetcherManager)
{code}

My guess in the dark to this problem is that the files are in use by Kafka and therefor the
delete fails. Solution would be to close all handles to the files and then delete.

Even if I restart Kafka, as soon as it loads up all topics it checks which ones are marked
for deletion and tries to delete those marked for deletion. This fails because Kafka already
has the files locked.

> Deleting a topic fails
> ----------------------
>
>                 Key: KAFKA-2231
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2231
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8.2.1
>         Environment: Windows 8.1
>            Reporter: James G. Haberly
>            Priority: Minor
>
> delete.topic.enable=true is in config\server.properties.
> Using --list shows the topic "marked for deletion".
> Stopping and restarting kafka and zookeeper does not delete the topic; it remains "marked
for deletion".
> Trying to recreate the topic fails with "Topic XXX already exists".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message