-
Notifications
You must be signed in to change notification settings - Fork 14k
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
KAFKA-8147: Add changelog topic configuration to KTable suppress #8029
Conversation
Ok to test |
@bbejeck |
Both Java 11 and 8 failed. Test results already cleaned up. Retest this please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @highluck , sorry for the slow review cycle. I was waiting for the opportunity to really give you a good review.
I have three high level comments:
- The javadocs are not quite right, see the suggestions below.
- If we're going to start using BufferConfigInternal as the internally-facing interface for BufferConfig, I'd like to keep it more like an interface by maintaining all the state in the implementation classes, just for future maintainability. I wasn't 100% sure how clean this would be, so I tried it out myself. Here's my suggestion: SUGGESTION: KAFKA-8147: Add changelog topic configuration to KTable suppress highluck/kafka#1
- We need at least one more test to demonstrate that the desired log configuration (or disablement) would actually be used. This should probably take the form of an integration test, in which we start a Streams application and then inspect the resulting topic to verify it got configured properly. Otherwise, we'd have no regression test that the KTableImpl logging code actually takes effect and continues to work after future modifications to the code base.
streams/src/main/java/org/apache/kafka/streams/kstream/Suppressed.java
Outdated
Show resolved
Hide resolved
streams/src/main/java/org/apache/kafka/streams/kstream/Suppressed.java
Outdated
Show resolved
Hide resolved
@vvcephei i'm code update and add test code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @highluck , thanks for the update!
Thanks for adding the integration test. It doesn't look like we are actually verifying the changelog topic. I think you can query the EmbeddedKafkaCluster to get the actual log configuration. I'd consider the following two tests sufficient:
- Add a non-default configuration, such as setting the retention time to some magic number, then query
CLUSTER
to see if that configuration did indeed take effect - Disable logging and then query
CLUSTER
to verify that the topic is in fact absent.
Additionally, we should verify (either in a new or just in an existing test) that the changelog is present by default.
Thanks!
-John
@vvcephei I added two cases of test code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, @highluck !
I suggested a few tweaks.
Also, we'd need one more test like shouldAllowDisablingChangelog()
that does withLoggingDisabled()
, and then verifies assertThat(CLUSTER.getAllTopicsInCluster(), not(contains(changeLog)));
. Although that verification might be brittle. Maybe it would be safer to just verify that there is no changelog in the cluster that contains the word "KTABLE-SUPPRESS".
streams/src/test/java/org/apache/kafka/streams/integration/SuppressionIntegrationTest.java
Outdated
Show resolved
Hide resolved
streams/src/test/java/org/apache/kafka/streams/integration/SuppressionIntegrationTest.java
Outdated
Show resolved
Hide resolved
streams/src/test/java/org/apache/kafka/streams/integration/SuppressionIntegrationTest.java
Outdated
Show resolved
Hide resolved
streams/src/test/java/org/apache/kafka/streams/integration/SuppressionIntegrationTest.java
Outdated
Show resolved
Hide resolved
streams/src/test/java/org/apache/kafka/streams/integration/SuppressionIntegrationTest.java
Outdated
Show resolved
Hide resolved
Ok to test |
@vvcephei |
Retest this please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good! Thanks, @highluck
Ok to test. |
Retest this, please. |
Hey @highluck , it looks like the tests can't build because of:
|
You should be able to reproduce this with :
|
@vvcephei Retest this, please. |
test this please |
ok to test |
@vvcephei |
It looks like the Java 11 build was terminated (maybe timed out, or maybe terminated due to some ops on the host). But, since the java 8 build passed, and the java 11 build was so close to passing, I'm going to run the Streams tests locally and then merge. |
Local build passed:
|
Merged to trunk, updated Jira and KIP to reflect the completed status. Thanks for the contribution, @highluck ! |
@vvcephei |
@mjsax |
Cool. Just open a new PR using the same Jira number in the title and ping for review. Let us know if you have any questions. |
@mjsax |
There is a directory As this PR implements a KIP, you should update \cc @vvcephei |
@mjsax thank you for comment!! |
Committer Checklist (excluded from commit message)