question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Low performance while using `latest` as `schema.id`

See original GitHub issue

Looks like SchemaLoader uses unchached call to get the latest version id:

https://github.com/AbsaOSS/ABRiS/blob/master/src/main/scala/za/co/absa/abris/avro/schemas/SchemaLoader.scala#L103-L110

This happens quite often and results in a huge amount of http requests to schema registry. This value could be cached for some time period, and the time period should be configurable.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
felipemmelocommented, Apr 21, 2020

Hi @agolovenko , my comments on your comments.

  1. The method you’re referring to is getLatestSchemaMetadata, right? This one

  2. If yes, then of course it has to constantly query Schema Registry for the latest version, however, this only happens when getting the schema to be used by Catalyst, as you can browse here to confirm

  3. The subsequent calls can and must be cached since they are based on the id available on top of the payload for each record, as you can see here

Anyway, thank you very much for coming back and we’ll soon release an improvement for this.

0reactions
cerveadacommented, Jun 1, 2020

You are welcome. Since there seems to be no issue any more, I’m closing this ticket. Please open a new one if you have any problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docs: clarify semantics of schema ids? · Issue #158 - GitHub
@miguno I think one potential problem in trying to use schema IDs for ... In that case, the concept of asking for the...
Read more >
17 Ways to Mess Up Self-Managed Schema Registry - Confluent
If there isn't, it is possible to end up with duplicate schema IDs, depending on the view of the current primary instance. Mistake...
Read more >
Schema Inference With ID - ksqlDB Documentation
Here's what you can do with schema inference with IDs in ksqlDB: Declare streams and tables on Kafka topics with supported key and...
Read more >
Replicate Avro Messages To Target, Conflicting Schema ...
Is it ok to copy the topic with Replicator when the target schema registry has the same schema ID but with a different...
Read more >
Monitor performance by using the Query Store - SQL Server
x), SQL Server 2017 (14.x), SQL Server 2019 (15.x). It is enabled by default in the READ_WRITE mode for new databases starting with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found