back interdiff of round #2 and #1

appview,knotserver,spindle: rework jetstream #480

merged
opened by oppi.li targeting master from push-mtsxyxnkznyy

do not return errors from ingesters, this causes the read loop to be killed.

Signed-off-by: oppiliappan me@oppi.li

files
appview
jetstream
knotserver
log
spindle
ERROR
appview/ingester.go

Failed to calculate interdiff for this file.

ERROR
knotserver/handler.go

Failed to calculate interdiff for this file.

ERROR
knotserver/ingester.go

Failed to calculate interdiff for this file.

ERROR
log/log.go

Failed to calculate interdiff for this file.

ERROR
spindle/ingester.go

Failed to calculate interdiff for this file.

NEW
jetstream/jetstream.go
··· 68 68 type processor func(context.Context, *models.Event) error 69 69 70 70 func (j *JetstreamClient) withDidFilter(processFunc processor) processor { 71 - // empty filter => all dids allowed 72 - if len(j.wantedDids) == 0 { 73 - return processFunc 74 - } 75 71 // since this closure references j.WantedDids; it should auto-update 76 72 // existing instances of the closure when j.WantedDids is mutated 77 73 return func(ctx context.Context, evt *models.Event) error { 74 + // empty filter => all dids allowed 75 + if len(j.wantedDids) == 0 { 76 + return processFunc(ctx, evt) 77 + } 78 + 78 79 if _, ok := j.wantedDids[evt.Did]; ok { 79 80 return processFunc(ctx, evt) 80 81 } else {