Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage log.dir in the EmbeddedKafkaBroker #1471

Merged
merged 1 commit into from
May 1, 2020

Conversation

garyrussell
Copy link
Contributor

Resolves #194

Create the temporary directory in EKB instead of the broker to avoid
NoSuchFileExceptions during shutdown.

cherry-pick to 2.4.x, 2.3.x, 2.2.x

@artembilan
Copy link
Member

Gary, any ideas about Travis failure:

KafkaAdminTests > alreadyExists() FAILED

    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132

        Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1796

            Caused by: kafka.common.InconsistentBrokerIdException at KafkaServer.scala:767

KafkaAdminTests > testTopicConfigs() FAILED

    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132

        Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1796

            Caused by: kafka.common.InconsistentBrokerIdException at KafkaServer.scala:767

KafkaAdminTests > toggleBootstraps() FAILED

    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132

        Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1796

            Caused by: kafka.common.InconsistentBrokerIdException at KafkaServer.scala:767

KafkaAdminTests > testAddTopicsAndAddPartitions() FAILED

    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132

        Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1796

            Caused by: kafka.common.InconsistentBrokerIdException at KafkaServer.scala:767

?

@garyrussell
Copy link
Contributor Author

No; but I realize there is a problem with this if there are multiple broker instances.

@artembilan
Copy link
Member

artembilan commented May 1, 2020

but I realize there is a problem with this if there are multiple broker instances.

I think you mean that every broker instance we start with Embedded Kafka has to have its own unique logDir?

@garyrussell
Copy link
Contributor Author

Exactly, yes; and it is the cause of this problem because this test uses 3 brokers.

Resolves spring-projects#194

Create the temporary directory in EKB instead of the broker to avoid
`NoSuchFileException`s during shutdown.

**cherry-pick to 2.4.x, 2.3.x, 2.2.x**
@garyrussell
Copy link
Contributor Author

Force-pushed and travis is green.

@artembilan artembilan merged commit 6d2bd6f into spring-projects:master May 1, 2020
@artembilan
Copy link
Member

Cherry-picked to 2.4.x & 2.3.x.
Back-ported to 2.2.x as a21fdeb after fixing conflicts.

@garyrussell garyrussell deleted the logDir branch May 1, 2020 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replication-offset-checkpoint.tmp (No such file or directory)
2 participants