Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Independent config flags for socket read and write buffer sizes. ### Changed - Strictly validate authoritative match create parameter encoding. - Build with Go 1.14.2 release. ### Fixed Loading server/match_registry.go +14 −0 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ package server import ( "bytes" "context" "encoding/gob" "encoding/json" "fmt" "github.com/blevesearch/bleve/search/query" Loading @@ -33,6 +35,13 @@ import ( "go.uber.org/zap" ) func init() { // Ensure gob can deal with maps of interfaces. gob.Register(map[string]interface{}{}) // Ensure gob can deal with slices of interfaces. gob.Register([]interface{}{}) } var ( MatchFilterValue = uint8(0) MatchFilterPtr = &MatchFilterValue Loading @@ -40,6 +49,7 @@ var ( MatchLabelMaxBytes = 2048 ErrCannotEncodeParams = errors.New("error creating match: cannot encode params") ErrMatchLabelTooLong = errors.New("match label too long, must be 0-2048 bytes") ErrDeferredBroadcastFull = errors.New("too many deferred message broadcasts per tick") ) Loading Loading @@ -134,6 +144,10 @@ func NewLocalMatchRegistry(logger, startupLogger *zap.Logger, config Config, tra } func (r *LocalMatchRegistry) CreateMatch(ctx context.Context, logger *zap.Logger, createFn RuntimeMatchCreateFunction, module string, params map[string]interface{}) (string, error) { if err := gob.NewEncoder(&bytes.Buffer{}).Encode(params); err != nil { return "", ErrCannotEncodeParams } id := uuid.Must(uuid.NewV4()) matchLogger := logger.With(zap.String("mid", id.String())) stopped := atomic.NewBool(false) Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Independent config flags for socket read and write buffer sizes. ### Changed - Strictly validate authoritative match create parameter encoding. - Build with Go 1.14.2 release. ### Fixed Loading
server/match_registry.go +14 −0 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ package server import ( "bytes" "context" "encoding/gob" "encoding/json" "fmt" "github.com/blevesearch/bleve/search/query" Loading @@ -33,6 +35,13 @@ import ( "go.uber.org/zap" ) func init() { // Ensure gob can deal with maps of interfaces. gob.Register(map[string]interface{}{}) // Ensure gob can deal with slices of interfaces. gob.Register([]interface{}{}) } var ( MatchFilterValue = uint8(0) MatchFilterPtr = &MatchFilterValue Loading @@ -40,6 +49,7 @@ var ( MatchLabelMaxBytes = 2048 ErrCannotEncodeParams = errors.New("error creating match: cannot encode params") ErrMatchLabelTooLong = errors.New("match label too long, must be 0-2048 bytes") ErrDeferredBroadcastFull = errors.New("too many deferred message broadcasts per tick") ) Loading Loading @@ -134,6 +144,10 @@ func NewLocalMatchRegistry(logger, startupLogger *zap.Logger, config Config, tra } func (r *LocalMatchRegistry) CreateMatch(ctx context.Context, logger *zap.Logger, createFn RuntimeMatchCreateFunction, module string, params map[string]interface{}) (string, error) { if err := gob.NewEncoder(&bytes.Buffer{}).Encode(params); err != nil { return "", ErrCannotEncodeParams } id := uuid.Must(uuid.NewV4()) matchLogger := logger.With(zap.String("mid", id.String())) stopped := atomic.NewBool(false) Loading