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

Use unique topics to avoid "marked for deletion error" #426

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

bkornmeierpax8
Copy link
Contributor

@bkornmeierpax8 bkornmeierpax8 commented Jun 15, 2023

@smcvb I noticed this test failing after merging my changes. In ConsumerPositionsUtilIntegrationTest.java's tearDown method we were deleting the topic, however Kafka won't actually delete the topic right away, it just marks it for deletion. This change provides a unique topic per test, to just avoid the issue entirely.

@bkornmeierpax8
Copy link
Contributor Author

bkornmeierpax8 commented Jun 15, 2023

@smcvb I also noticed that testFetchEventsTaskInterruptionClosesAsExpected is failing some of the time, looking a bit at it I see we wait for the closeHandle to be called in the test:
https://github.com/AxonFramework/extension-kafka/blob/master/kafka/src/test/java/org/axonframework/extensions/kafka/eventhandling/consumer/FetchEventsTaskTest.java#L137-L138

However, in the code, the closing of the consumer happens after the handler is called:

I am wondering if we may want to add a small delay after the closeHandler is called, we could use Kafka's DEFAULT_CLOSE_TIMEOUT_MS value + 100 millis.

DEFAULT_CLOSE_TIMEOUT_MS is defined here:
https://github.com/apache/kafka/blob/11aa999d2054d3ecb28de2a95ada02131c5d9616/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java#L568

What do you think about that?

@bkornmeierpax8
Copy link
Contributor Author

Disregard previous comment. I see the we had a similar test in testCloseCallsProvidedCloseHandler and it had a timeout() added, so I just reused that here: a975338

@smcvb smcvb added this to the Release 4.8.0 milestone Jun 16, 2023
@smcvb smcvb requested review from a team, gklijs, CodeDrivenMitch and smcvb and removed request for a team June 16, 2023 08:23
Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix here, @bkornmeierpax8.

@smcvb smcvb merged commit a7d760f into AxonFramework:master Jun 16, 2023
@smcvb smcvb changed the title use unique topics to avoid "marked for deletion error" Use unique topics to avoid "marked for deletion error" Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants