Skip to content

Commit

Permalink
fix(fxgcppubsub): Fixed race conditions on avro binary codec cache (#20)
Browse files Browse the repository at this point in the history
* fix(fxgcppubsub): Fixed race conditions on avro binary codec

* fix(fxgcppubsub): Fixed race conditions on avro binary codec
  • Loading branch information
ekkinox authored Jul 9, 2024
1 parent 90066ff commit 6cf94fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fxgcppubsub/codec/avro.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type AvroBinaryCodec struct {
func NewAvroBinaryCodec(schemaDefinition string) (*AvroBinaryCodec, error) {
api := avro.Config{}.Freeze()

schema, err := avro.Parse(schemaDefinition)
schema, err := avro.ParseBytesWithCache([]byte(schemaDefinition), "", &avro.SchemaCache{})
if err != nil {
return nil, fmt.Errorf("cannot parse avro schema: %w", err)
}
Expand Down

0 comments on commit 6cf94fc

Please # to comment.