Skip to content

KAFKA-2519; NetworkClient.close should remove node from inFlightRequests#193

Closed
ijuma wants to merge 1 commit into
apache:trunkfrom
ijuma:kafka-2519-network-client-close-remove-in-flight
Closed

KAFKA-2519; NetworkClient.close should remove node from inFlightRequests#193
ijuma wants to merge 1 commit into
apache:trunkfrom
ijuma:kafka-2519-network-client-close-remove-in-flight

Conversation

@ijuma

@ijuma ijuma commented Sep 4, 2015

Copy link
Copy Markdown
Member

No description provided.

@asfbot

asfbot commented Sep 4, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #353 FAILURE
Looks like there's a problem with this pull request

@ijuma

ijuma commented Sep 4, 2015

Copy link
Copy Markdown
Member Author

Tests passed locally.

@junrao

junrao commented Sep 4, 2015

Copy link
Copy Markdown
Contributor

Thanks for the patch. LGTM.

@asfgit asfgit closed this in f257312 Sep 4, 2015
benstopford pushed a commit to benstopford/kafka that referenced this pull request Sep 10, 2015
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jun Rao <junrao@gmail.com>

Closes apache#193 from ijuma/kafka-2519-network-client-close-remove-in-flight
@ijuma ijuma deleted the kafka-2519-network-client-close-remove-in-flight branch March 1, 2016 22:50
efeg pushed a commit to efeg/kafka that referenced this pull request Jan 29, 2020
efeg pushed a commit to efeg/kafka that referenced this pull request Sep 8, 2021
…optional field (apache#193)

TICKET = LIKAFKA-37320
LI_DESCRIPTION =
After the change made in b28666d,
an old client version sending a MetadataRequest without the "ExcludePartitions"
field to a new kafka server version expecting the field will result in the exception below.
This PR turns the "ExcludePartitions" field into an optional one introduced in KIP-482.

org.apache.kafka.common.errors.InvalidRequestException: Error getting request for apiKey: METADATA, apiVersion: 9, connectionId: 10.154.165.183:16637-10.154.87.109:44876-2848, listenerName: ListenerName(SSL), principal: User:likafka-cruise-control:None:prod-ltx1
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:70) ~[kafka-clients-2.4.1.26.jar:?]
        at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:89) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1(SocketServer.scala:928) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1$adapted(SocketServer.scala:909) ~[kafka_2.12-2.4.1.26.jar:?]
        at scala.collection.Iterator.foreach(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.Iterator.foreach$(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach(IterableLike.scala:74) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56) [scala-library-2.12.10.jar:?]
        at kafka.network.Processor.processCompletedReceives(SocketServer.scala:909) [kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.run(SocketServer.scala:799) [kafka_2.12-2.4.1.26.jar:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.apache.kafka.common.protocol.types.SchemaException: Error reading field '_tagged_fields': java.nio.BufferUnderflowException
        at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:118) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.protocol.ApiKeys.parseRequest(ApiKeys.java:327) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:65) ~[kafka-clients-2.4.1.26.jar:?]
        ... 12 more

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 4, 2022
…he listTopics() API (apache#289)

This is a squash of 2 commits:
* [LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)
* [LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

Compared to the original implementation, which uses the topic names directly during `excludePartitions = true`, this new implementation will still visit the metadata cache in order to obtain the topic Id info.

==1st commit message==

[LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)

TICKET = LIKAFKA-37320
LI_DESCRIPTION = Making the listTopics() API more light-weight so that a kafka broker would only return the topic names in the MetadataResponse. The partitions and replicas info would not be included in the MetadataResponse for the listTopics() API.

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

==2nd commit message==

[LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

TICKET = LIKAFKA-37320
LI_DESCRIPTION =
After the change made in b28666d,
an old client version sending a MetadataRequest without the "ExcludePartitions"
field to a new kafka server version expecting the field will result in the exception below.
This PR turns the "ExcludePartitions" field into an optional one introduced in KIP-482.

org.apache.kafka.common.errors.InvalidRequestException: Error getting request for apiKey: METADATA, apiVersion: 9, connectionId: 10.154.165.183:16637-10.154.87.109:44876-2848, listenerName: ListenerName(SSL), principal: User:likafka-cruise-control:None:prod-ltx1
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:70) ~[kafka-clients-2.4.1.26.jar:?]
        at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:89) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1(SocketServer.scala:928) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1$adapted(SocketServer.scala:909) ~[kafka_2.12-2.4.1.26.jar:?]
        at scala.collection.Iterator.foreach(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.Iterator.foreach$(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach(IterableLike.scala:74) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56) [scala-library-2.12.10.jar:?]
        at kafka.network.Processor.processCompletedReceives(SocketServer.scala:909) [kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.run(SocketServer.scala:799) [kafka_2.12-2.4.1.26.jar:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.apache.kafka.common.protocol.types.SchemaException: Error reading field '_tagged_fields': java.nio.BufferUnderflowException
        at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:118) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.protocol.ApiKeys.parseRequest(ApiKeys.java:327) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:65) ~[kafka-clients-2.4.1.26.jar:?]
        ... 12 more

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 28, 2022
…he listTopics() API (apache#289)

This is a squash of 2 commits:
* [LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)
* [LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

Compared to the original implementation, which uses the topic names directly during `excludePartitions = true`, this new implementation will still visit the metadata cache in order to obtain the topic Id info.

==1st commit message==

[LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)

TICKET = LIKAFKA-37320
LI_DESCRIPTION = Making the listTopics() API more light-weight so that a kafka broker would only return the topic names in the MetadataResponse. The partitions and replicas info would not be included in the MetadataResponse for the listTopics() API.

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

==2nd commit message==

[LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

TICKET = LIKAFKA-37320
LI_DESCRIPTION =
After the change made in b28666d,
an old client version sending a MetadataRequest without the "ExcludePartitions"
field to a new kafka server version expecting the field will result in the exception below.
This PR turns the "ExcludePartitions" field into an optional one introduced in KIP-482.

org.apache.kafka.common.errors.InvalidRequestException: Error getting request for apiKey: METADATA, apiVersion: 9, connectionId: 10.154.165.183:16637-10.154.87.109:44876-2848, listenerName: ListenerName(SSL), principal: User:likafka-cruise-control:None:prod-ltx1
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:70) ~[kafka-clients-2.4.1.26.jar:?]
        at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:89) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1(SocketServer.scala:928) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1$adapted(SocketServer.scala:909) ~[kafka_2.12-2.4.1.26.jar:?]
        at scala.collection.Iterator.foreach(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.Iterator.foreach$(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach(IterableLike.scala:74) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56) [scala-library-2.12.10.jar:?]
        at kafka.network.Processor.processCompletedReceives(SocketServer.scala:909) [kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.run(SocketServer.scala:799) [kafka_2.12-2.4.1.26.jar:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.apache.kafka.common.protocol.types.SchemaException: Error reading field '_tagged_fields': java.nio.BufferUnderflowException
        at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:118) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.protocol.ApiKeys.parseRequest(ApiKeys.java:327) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:65) ~[kafka-clients-2.4.1.26.jar:?]
        ... 12 more

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jun 16, 2022
…he listTopics() API (apache#289)

This is a squash of 2 commits:
* [LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)
* [LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

Compared to the original implementation, which uses the topic names directly during `excludePartitions = true`, this new implementation will still visit the metadata cache in order to obtain the topic Id info.

==1st commit message==

[LI-HOTFIX] Exclude the partitions info in the MetadataResponse for the listTopics() API (apache#183)

TICKET = LIKAFKA-37320
LI_DESCRIPTION = Making the listTopics() API more light-weight so that a kafka broker would only return the topic names in the MetadataResponse. The partitions and replicas info would not be included in the MetadataResponse for the listTopics() API.

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

==2nd commit message==

[LI-HOTFIX] Making the ExcludePartitions field in MetadataRequest an optional field (apache#193)

TICKET = LIKAFKA-37320
LI_DESCRIPTION =
After the change made in b28666d,
an old client version sending a MetadataRequest without the "ExcludePartitions"
field to a new kafka server version expecting the field will result in the exception below.
This PR turns the "ExcludePartitions" field into an optional one introduced in KIP-482.

org.apache.kafka.common.errors.InvalidRequestException: Error getting request for apiKey: METADATA, apiVersion: 9, connectionId: 10.154.165.183:16637-10.154.87.109:44876-2848, listenerName: ListenerName(SSL), principal: User:likafka-cruise-control:None:prod-ltx1
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:70) ~[kafka-clients-2.4.1.26.jar:?]
        at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:89) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1(SocketServer.scala:928) ~[kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.$anonfun$processCompletedReceives$1$adapted(SocketServer.scala:909) ~[kafka_2.12-2.4.1.26.jar:?]
        at scala.collection.Iterator.foreach(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.Iterator.foreach$(Iterator.scala:941) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach(IterableLike.scala:74) [scala-library-2.12.10.jar:?]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73) [scala-library-2.12.10.jar:?]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56) [scala-library-2.12.10.jar:?]
        at kafka.network.Processor.processCompletedReceives(SocketServer.scala:909) [kafka_2.12-2.4.1.26.jar:?]
        at kafka.network.Processor.run(SocketServer.scala:799) [kafka_2.12-2.4.1.26.jar:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.apache.kafka.common.protocol.types.SchemaException: Error reading field '_tagged_fields': java.nio.BufferUnderflowException
        at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:118) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.protocol.ApiKeys.parseRequest(ApiKeys.java:327) ~[kafka-clients-2.4.1.26.jar:?]
        at org.apache.kafka.common.requests.RequestContext.parseRequest(RequestContext.java:65) ~[kafka-clients-2.4.1.26.jar:?]
        ... 12 more

EXIT_CRITERIA = When this change is merged in upstream and the corresponding change is pulled into a future release.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
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.

3 participants