You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Martin Kleppmann (JIRA)" <ji...@apache.org> on 2012/06/21 03:10:43 UTC

[jira] [Created] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Martin Kleppmann created KAFKA-371:
--------------------------------------

             Summary: Creating topic of empty string puts broker in a bad state
                 Key: KAFKA-371
                 URL: https://issues.apache.org/jira/browse/KAFKA-371
             Project: Kafka
          Issue Type: Bug
            Reporter: Martin Kleppmann
             Fix For: 0.7


Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:

2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
ror
kafka.common.InvalidTopicException: topic name can't be empty
        at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
        at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
rs.scala:75)
        at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
        at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
        at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
        at kafka.network.Processor.handle(SocketServer.scala:289)
        at kafka.network.Processor.read(SocketServer.scala:312)
        at kafka.network.Processor.run(SocketServer.scala:207)
        at java.lang.Thread.run(Thread.java:679)

Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.

The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Kreps updated KAFKA-371:
----------------------------

    Attachment: KAFKA-371-0.8-v2.patch

Neha can you sanity check this? Here are the changes:

- Remove some unneeded getter getServerConfig
- Rename getTopicIterator to topics()
- Simplify getLogIterator() and rename to allLogs()
- Remove awaitStartup latch and awaitStartup latch acquisition. The comment on startup() says it registers in zookeeper, but this doesn't seem to be true
- Remove getLogPool. createLog checks correctness of creation, and fails if it fails. getLog returns null if the log doesn't exist, as per the contract. getOrCreateLog will fail when createLog fails. I think this is more sensible, and elimantes the getter
- Remove the word "Map" from things of type Map
- MS should be Ms by our usual conventions
- Remove helper getLogRetentionMSMap

I think the latch was there because log manager was somehow doing zk registration (according to comments). But I don't see that code there at all now, and logManager shouldn't be talking to zk, so i think it got cleaned up. So now theoretically we shouldn't need that and the weird ordering where we take requests before log manager is initiatialized but then block should not be needed. 

Also, I removed the EasyMock verification on logmanager (I think all it does is check that the config was fetched), which I don't think is useful? But EasyMock is kind of a blackbox to me.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417383#comment-13417383 ] 

Jonathan Creasy commented on KAFKA-371:
---------------------------------------

Well, I didn't see any way for the bug to have occurred unless createLog was being called outside of where getLogPool gets called. So, it does appear to be unnecessary, perhaps these checks were added and the ticket was never updated? 


                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418736#comment-13418736 ] 

Jay Kreps commented on KAFKA-371:
---------------------------------

Got it, committed.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Kreps updated KAFKA-371:
----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.7)
                   0.8
           Status: Resolved  (was: Patch Available)
    
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418745#comment-13418745 ] 

Jay Kreps commented on KAFKA-371:
---------------------------------

Hey Jonathan, I don't think so, but I may have misunderstood. Basically a log has two states
 OPEN
 CLOSED

Every time we create a log object we run recovery on it which validates any messages since the last know flush point and truncates any partial writes to put the log in a known state. This is done as part of log construction so there is no way to have a reference to a log until it is known to be valid and ready for writes.

Our policy is that we actually kill the instance of the broker if we see an IOException while writing to disk (STONITH, if you will), so there is effectively no invalid state. The reason for this is that an IO error is effectively the same as a broker failure in that it indicates a potentially partial or corrupt write. You cannot append to the log in this state, so continuing to accept traffic only makes thing worse, the best policy is to die and let the other brokers cover things.

Attempt to read or write to a closed log would be a programming error in the broker, and should just give an exception about the file being closed, so I don't know if we need additional checks there.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-371.
---------------------------

    Resolution: Fixed
    
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch, KAFKA-371-0.8-v2.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418586#comment-13418586 ] 

Neha Narkhede commented on KAFKA-371:
-------------------------------------

+1. 

Minor comment -

Change logCleanupThresholdMS to logCleanupThresholdMs while you're in there
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417656#comment-13417656 ] 

Neha Narkhede commented on KAFKA-371:
-------------------------------------

Yes, that will work too. I guess the API was added so that every access to the log was guarded with the check. But if we ensure that you can't create one in the first place, we can get rid of the check in getLogPool and keep the one in createLog. 
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Creasy updated KAFKA-371:
----------------------------------

    Affects Version/s: 0.6
                       0.7
               Status: Patch Available  (was: Open)
    
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.7, 0.6
>            Reporter: Martin Kleppmann
>             Fix For: 0.7
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417268#comment-13417268 ] 

Jay Kreps commented on KAFKA-371:
---------------------------------

Committed the 0.8 patch. Thanks.

At the moment I don't know if we are doing a 0.7.2 so I am going to hold off on the 0.7.1 patch.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.7
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418632#comment-13418632 ] 

Jonathan Creasy commented on KAFKA-371:
---------------------------------------

Does it make sense to have a function to "validate a log" and call that any time you want to validate that you are reading/writing a log? Potentially some of the validation would be redundant and called at times it didn't need to be, reducing capacity. 

So the balance is between consistent checking and efficient execution.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Kreps reopened KAFKA-371:
-----------------------------

      Assignee: Jay Kreps

Reopening for cleanups of LogManager
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417647#comment-13417647 ] 

Jay Kreps commented on KAFKA-371:
---------------------------------

Hmm, good point. This is a little odd, though, no? Why would getting a log pool check the validity of a partition? Not sure how that came about. I recommend we delete that and keep the check in create--if you can't create a bad log you don't need to check on every access. Objections?

Actually I have a bunch of clean-ups I would like to do in LogManager. Let me post a patch with all these while I am in there.
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Creasy updated KAFKA-371:
----------------------------------

    Attachment: KAFKA-371-0.7.1.patch

Probably should set fix version to 0.7.1
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.7
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416792#comment-13416792 ] 

Jonathan Creasy commented on KAFKA-371:
---------------------------------------

Modifed createLog() to fail if it has been asked to create a log that would fail on the getLogPool() function.

I am not sure if the partition check is correct here, it appears that the partition could be any >0 partition and be OK since the file would get created. If there is no where else that partition would need to exist that would be OK, I think that this may not be the case though as it would need to be in Zk if my current understanding is correct. 

                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.7
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418632#comment-13418632 ] 

Jonathan Creasy edited comment on KAFKA-371 at 7/19/12 8:20 PM:
----------------------------------------------------------------

Does it make sense to have a function to "validate a log" and call that any time you want to validate that the log you are reading/writing is valid? Potentially some of the validation would be redundant and called at times it didn't need to be, reducing capacity. 

So the balance is between consistent checking and efficient execution.
                
      was (Author: jcreasy):
    Does it make sense to have a function to "validate a log" and call that any time you want to validate that you are reading/writing a log? Potentially some of the validation would be redundant and called at times it didn't need to be, reducing capacity. 

So the balance is between consistent checking and efficient execution.
                  
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>            Assignee: Jay Kreps
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8-v2.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417288#comment-13417288 ] 

Neha Narkhede commented on KAFKA-371:
-------------------------------------

I think in the 0.8 patch, the changes to createLog are unnecessary. This is because the same check happens inside getLogPool, which is always called before createLog in getOrCreateLog, no ?
                
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6, 0.7
>            Reporter: Martin Kleppmann
>             Fix For: 0.8
>
>         Attachments: KAFKA-371-0.7.1.patch, KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-371) Creating topic of empty string puts broker in a bad state

Posted by "Jonathan Creasy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Creasy updated KAFKA-371:
----------------------------------

    Attachment: KAFKA-371-0.8.patch
    
> Creating topic of empty string puts broker in a bad state
> ---------------------------------------------------------
>
>                 Key: KAFKA-371
>                 URL: https://issues.apache.org/jira/browse/KAFKA-371
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Martin Kleppmann
>             Fix For: 0.7
>
>         Attachments: KAFKA-371-0.8.patch
>
>
> Using the Java client library, I accidentally published a message where the topic name was the empty string. This put the broker in a bad state where publishing became impossible, and the following exception was logged 10-20 times per second:
> 2012-06-21 00:41:30,324 [kafka-processor-3] ERROR kafka.network.Processor  - Closing socket for /127.0.0.1 because of er
> ror
> kafka.common.InvalidTopicException: topic name can't be empty
>         at kafka.log.LogManager.getOrCreateLog(LogManager.scala:165)
>         at kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandle
> rs.scala:75)
>         at kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:58)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:43)
>         at kafka.network.Processor.handle(SocketServer.scala:289)
>         at kafka.network.Processor.read(SocketServer.scala:312)
>         at kafka.network.Processor.run(SocketServer.scala:207)
>         at java.lang.Thread.run(Thread.java:679)
> Restarting Kafka did not help. I had to manually clear out the bad state in Zookeeper to resolve the problem.
> The broker should not accept a message that would put it in such a bad state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira