Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(cache): Add a sharded map for global cache #9180

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix commit error
  • Loading branch information
harshil-goel committed Oct 6, 2024
commit 37ca28aa90d663523c2d0c86d053070605c3c6be
6 changes: 4 additions & 2 deletions posting/mvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,8 @@ func getNew(key []byte, pstore *badger.DB, readTs uint64) (*List, error) {
lCopy := copyList(cacheItem.list)
cacheItem.list.RUnlock()
globalCache.UnlockKey(keyHash)
fmt.Println("====Getting cache", readTs, pk, lCopy.mutationMap, lCopy.Value(readTs))
allV, _ := lCopy.AllValues(readTs)
fmt.Println("====Getting cache", readTs, pk, lCopy.mutationMap, allV)
return lCopy, nil
}
}
Expand Down Expand Up @@ -794,8 +795,9 @@ func getNew(key []byte, pstore *badger.DB, readTs uint64) (*List, error) {
} else {
cacheItem.Set(copyList(l), readTs)
}
fmt.Println("====Getting from disk", readTs, pk, l.mutationMap, l.Value(readTs))
l.RUnlock()
allV, _ := l.AllValues(readTs)
fmt.Println("====Getting from disk", readTs, pk, l.mutationMap, allV)
globalCache.UnlockKey(keyHash)
}

Expand Down