diff --git a/events/dbpersist.go b/events/dbpersist.go index 77a027607..18413256c 100644 --- a/events/dbpersist.go +++ b/events/dbpersist.go @@ -549,6 +549,7 @@ func (p *DbPersistence) hydrateCommit(ctx context.Context, rer *RepoEventRecord) if len(cs) > carstore.MaxSliceLength { out.TooBig = true + out.Blocks = []byte{} } else { out.Blocks = cs } diff --git a/indexer/indexer.go b/indexer/indexer.go index cdfcd1918..c1bbbdc07 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -148,7 +148,7 @@ func (ix *Indexer) HandleRepoEvent(ctx context.Context, evt *repomgr.RepoEvent) toobig := false slice := evt.RepoSlice if len(slice) > MaxEventSliceLength || len(outops) > MaxOpsSliceLength { - slice = nil + slice = []byte{} outops = nil toobig = true }