Skip to content

Commit

Permalink
perf(core): Introduce mutable map struct to update mutation map in Li…
Browse files Browse the repository at this point in the history
…st object
  • Loading branch information
harshil-goel committed Oct 20, 2024
1 parent b6c6176 commit 2f48d14
Show file tree
Hide file tree
Showing 9 changed files with 635 additions and 207 deletions.
9 changes: 2 additions & 7 deletions posting/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,15 +709,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 = newMutableMap()
}
l.mutationMap[pl.CommitTs] = pl
l.mutationMap.insertOldPosting(pl)
return nil
})
if err != nil {
Expand Down
Loading

0 comments on commit 2f48d14

Please sign in to comment.