Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1366

Avoid creating unnecessary type metadata instances; only init once per column.

XMLWordPrintable

      Inside RecordsStreamProducer#schemaChanged we make several calls to the ReplicationMessage.Column#getTypeMetadata() which will construct a new TypeMetadataImpl for each call. We likely should only create the object once when it does not yet exist, e.g.:

      @Override
      public TypeMetadataImpl getTypeMetadata() {
        if (typeMetadata == null) {
          initMetadata();
        }
        return typeMetadata;
      }
      

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: