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

Connect - Improve Memory Allocations During Struct Validation

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment