Skip to content

Bug in protobuf serializer: unnecessary roundtrip to schema registry #935

Closed
@CTCC1

Description

@CTCC1

Description

https://github.com/confluentinc/confluent-kafka-python/blob/master/confluent_kafka/schema_registry/protobuf.py#L315
_known_subject is never populated.

The ProtobufSerializer has a cache for the subject created. However, it is never populated in the code. As such, the serializer does a round trip to the schema registry upon every serialization to lookup the schema by calling the lookup function here
https://github.com/confluentinc/confluent-kafka-python/blob/master/confluent_kafka/schema_registry/protobuf.py#L323

How to reproduce

Try to serialize multiple times with the same serializer instance and look at the schema registry logs.

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system:
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:schema-registryAny schema registry related isues rather than kafka isolated ones

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy