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

Connect - Improve Memory Allocations During Struct Validation

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0, 2.5.1
    • Component/s: KafkaConnect
    • Labels:
      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

              • Assignee:
                Unassigned
                Reporter:
                amcrn Auston McReynolds
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: