Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8938

Connect - Improve Memory Allocations During Struct Validation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0, 2.5.1
    • connect
    • None

    Description

      Summary: Struct value validation in Kafka Connect can be optimized to avoid creating an Iterator when the expectedClasses list is of size 1. This is a meaningful enhancement for high throughput connectors.

      Stack Trace from the Couchbase Kafka Connector:

      • java.util.Collections.singletonIterator(Object)
      • java.util.Collections$SingletonList.iterator()
      • org.apache.kafka.connect.data.ConnectSchema.validateValue(String, Schema, Object)
      • org.apache.kafka.connect.data.Struct.put(Field, Object)
      • org.apache.kafka.connect.data.Struct.put(String, Object)
      • com.couchbase.connect.kafka.handler.source.DefaultSchemaSourceHandler.buildValue(SourceHandlerParams, CouchbaseSourceRecord$Builder)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amcrn Auston McReynolds
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: