Skip to content

Commit 6cf94fc

Browse files
authored
fix(fxgcppubsub): Fixed race conditions on avro binary codec cache (#20)
* fix(fxgcppubsub): Fixed race conditions on avro binary codec * fix(fxgcppubsub): Fixed race conditions on avro binary codec
1 parent 90066ff commit 6cf94fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fxgcppubsub/codec/avro.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type AvroBinaryCodec struct {
2323
func NewAvroBinaryCodec(schemaDefinition string) (*AvroBinaryCodec, error) {
2424
api := avro.Config{}.Freeze()
2525

26-
schema, err := avro.Parse(schemaDefinition)
26+
schema, err := avro.ParseBytesWithCache([]byte(schemaDefinition), "", &avro.SchemaCache{})
2727
if err != nil {
2828
return nil, fmt.Errorf("cannot parse avro schema: %w", err)
2929
}

0 commit comments

Comments
 (0)