You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ijuma (via GitHub)" <gi...@apache.org> on 2023/12/17 17:29:29 UTC
[PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
ijuma opened a new pull request, #15032:
URL: https://github.com/apache/kafka/pull/15032
Breakdown of this PR:
* Extend the generator to support deprecated api versions
* Set deprecated api versions via the request json files
* Expose the information via metrics and the request log
The relevant section of the KIP:
> * Introduce metric `kafka.network:type=RequestMetrics,name=DeprecatedRequestsPerSec,request=(api-name),version=(api-version),clientSoftwareName=(client-software-name),clientSoftwareVersion=(client-software-version)`
> * Add boolean field `requestApiVersionDeprecated` to the request header section of the request log (alongside `requestApiKey` , `requestApiVersion`, `requestApiKeyName` , etc.).
TODO: Add tests for the new metric and request log.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #15032:
URL: https://github.com/apache/kafka/pull/15032#discussion_r1432179355
##########
generator/src/main/java/org/apache/kafka/message/StructRegistry.java:
##########
@@ -110,6 +110,7 @@ private void addStructSpecs(Versions parentVersions, List<FieldSpec> fields) {
// Synthesize a StructSpec object out of the fields.
StructSpec spec = new StructSpec(typeName,
field.versions().toString(),
+ null, // version deprecations not supported at field level //FIXME Perhaps we should pass `Versions.NONE.toString` instead
Review Comment:
Yes! My bad for not fixing this before I asked for the review. I attempted a fix, let's see if any tests fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma merged PR #15032:
URL: https://github.com/apache/kafka/pull/15032
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #15032:
URL: https://github.com/apache/kafka/pull/15032#discussion_r1432178897
##########
core/src/test/scala/unit/kafka/network/RequestConvertToJsonTest.scala:
##########
@@ -118,6 +119,21 @@ class RequestConvertToJsonTest {
assertEquals(expectedNode, actualNode)
}
+ @Test
+ def testRequestHeaderNodeWithDeprecatedApiVersion(): Unit = {
+ val alterIsrRequest = FetchRequest.Builder.forConsumer(0, 0, 0, Collections.emptyMap()).build(0);
Review Comment:
Fixed, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #15032:
URL: https://github.com/apache/kafka/pull/15032#issuecomment-1864456662
Merged to master and cherry-picked to 3.7.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "hachikuji (via GitHub)" <gi...@apache.org>.
hachikuji commented on code in PR #15032:
URL: https://github.com/apache/kafka/pull/15032#discussion_r1432175567
##########
generator/src/main/java/org/apache/kafka/message/StructRegistry.java:
##########
@@ -110,6 +110,7 @@ private void addStructSpecs(Versions parentVersions, List<FieldSpec> fields) {
// Synthesize a StructSpec object out of the fields.
StructSpec spec = new StructSpec(typeName,
field.versions().toString(),
+ null, // version deprecations not supported at field level //FIXME Perhaps we should pass `Versions.NONE.toString` instead
Review Comment:
Do you intend to address the FIXME in this patch?
##########
core/src/test/scala/unit/kafka/network/RequestConvertToJsonTest.scala:
##########
@@ -118,6 +119,21 @@ class RequestConvertToJsonTest {
assertEquals(expectedNode, actualNode)
}
+ @Test
+ def testRequestHeaderNodeWithDeprecatedApiVersion(): Unit = {
+ val alterIsrRequest = FetchRequest.Builder.forConsumer(0, 0, 0, Collections.emptyMap()).build(0);
Review Comment:
nit: `fetchRequest`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-15874: Add metric and request log attribute for deprecated request api versions (KIP-896) [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #15032:
URL: https://github.com/apache/kafka/pull/15032#issuecomment-1864448620
There are a few unrelated failures in the CI results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org