riferrei / srclient

Golang Client for Schema Registry
Apache License 2.0
235 stars 70 forks source link

Schema not found errors when creating schemas #106

Open adiglp opened 7 months ago

adiglp commented 7 months ago

Hello,

First of all, thank you for this amazing module, it really helped us

We are using it for automating schema registry operations for other teams with Git. Sometimes we've found strange errors when creating schemas, example: "{"error_code":40403,"message":"Schema 2213 not found"}"

Our Schema Registry architecture is composed on multiple instances for high availability purposes. Checking module code, we realized "CreateSchema" method performs 2 operations:

Our hypothesis is, as the http requests are distributed between the different backends:

  1. POST is routed to backend 1 (could be master or not, will redirect to master if not), successfully registering the schema
  2. GET is routed to backend 2 (can't be master), which didn't fetch yet the change from the topic
  3. Schema not found error is returned
  4. Schema is available as it was successfully registered

At least this makes sense to us. I'm super happy contributing and making code changes, but i'd like to align with you on the approach, we've some things in mind:

If you need any additional detail, please let me know

Thanks in advance, Guille

javishere commented 4 months ago

Hello, any news on that? We are facing the same issue.

juanlucruz commented 3 months ago

Hello @riferrei have you had the chance of checking on to this issue? It's also affecting us.