Skip to content

Commit

Permalink
perf(core): Introduce mutable layer struct in list
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil-goel committed Nov 1, 2024
1 parent 237dd74 commit 8497e3d
Show file tree
Hide file tree
Showing 9 changed files with 682 additions and 213 deletions.
9 changes: 2 additions & 7 deletions posting/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,15 +725,10 @@ func (r *rebuilder) RunWithoutTemp(ctx context.Context) error {
return err
}
pl.CommitTs = item.Version()
for _, mpost := range pl.Postings {
// commitTs, startTs are meant to be only in memory, not
// stored on disk.
mpost.CommitTs = item.Version()
}
if l.mutationMap == nil {
l.mutationMap = make(map[uint64]*pb.PostingList)
l.mutationMap = newMutableLayer()
}
l.mutationMap[pl.CommitTs] = pl
l.mutationMap.insertOldPosting(pl)
return nil
})
if err != nil {
Expand Down
Loading

0 comments on commit 8497e3d

Please sign in to comment.