Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema not found errors when creating schemas #106

Open
adiglp opened this issue Apr 17, 2024 · 3 comments
Open

Schema not found errors when creating schemas #106

adiglp opened this issue Apr 17, 2024 · 3 comments

Comments

@adiglp
Copy link

adiglp commented Apr 17, 2024

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:

  • New method similar to SetTimeout, example "SetCreateGetDelay". If set, it adds a delay between operations (https://github.com/riferrei/srclient/blob/master/schemaRegistryClient.go#L404)
  • New method called "SkipCreateGetSchema". If set, it skips getting the schema, decoupling it
  • Remove / decouple GetSchema from CreateSchema. For us make sense, probably for other usages can impact
  • Any other option proposal

If you need any additional detail, please let me know

Thanks in advance, Guille

@javishere
Copy link

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

@juanlucruz
Copy link

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

@AtakanColak
Copy link
Collaborator

Hi @adiglp, thank you for the thread and sorry for the late reply. I think decoupling them makes most sense. Could you provide a PR, preferably with a particular test please?

I'd also like to ask people facing the same issue, if this change is preferred or necessary (i.e. could you define a check on the caller function, and compare the error and do a getschema request there instead)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants