Skip to content

Commit

Permalink
Merge pull request #75 from kompl/FixCreateSchema
Browse files Browse the repository at this point in the history
Fix createSchema method
  • Loading branch information
riferrei authored Apr 12, 2022
2 parents 91d132d + 695885f commit a3d7db0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions schemaRegistryClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,8 @@ func (client *SchemaRegistryClient) CreateSchema(subject string, schema string,
if err != nil {
return nil, err
}
// Conceptually, the schema returned below will be the
// exactly same one created above. However, since Schema
// Registry can have multiple concurrent clients writing
// schemas, this may produce an incorrect result. Thus,
// this logic strongly relies on the idempotent guarantees
// from Schema Registry, as well as in the best practice
// that schemas don't change very often.
newSchema, err := client.GetLatestSchema(subject)

newSchema, err := client.GetSchema(schemaResp.ID)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a3d7db0

Please sign in to comment.