confluent-kafka-go icon indicating copy to clipboard operation
confluent-kafka-go copied to clipboard

RefreshLatestSchemaMetadataCache implementation refreshing latestToSchemaCache entries

Open nicolaspastorbueno-yape opened this issue 1 year ago • 2 comments
trafficstars

RefreshLatestSchemaMetadataCache implementation refreshing latestToSchemaCache entries Issue #1274

Why?: in order to allow refresh the internal state of cache that belongs to, the first time that GetLatestSchemaMetadata method is executed (client#latestToSchemaCache) or when the ttl cache is exired

Implementation:

  • RefreshLatestSchemaMetadataCache method implementation into schemaregistry_client.go, assuming variadic string with subjects arguments, iterating it and getting the schema-metadata for each one
  • by each schema-metadata, when it call occurs and get the schema-metadata into &SchemaMetadata
    • lock latestToSchemaCacheLock for possible R/W ah update latestToSchemaCache internal-state
    • when an error occurs when calling schema-metadata obtention, it puts in a multierror and returns the possible errors to be aware about this behavior

nicolaspastorbueno-yape avatar Aug 16 '24 22:08 nicolaspastorbueno-yape

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] avatar Aug 16 '24 22:08 cla-assistant[bot]

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Aug 16 '24 22:08 cla-assistant[bot]

Closed in favor of https://github.com/confluentinc/confluent-kafka-go/pull/1305

nicolaspastorbueno-yape avatar Sep 26 '24 11:09 nicolaspastorbueno-yape