You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LRU cache in Alpha has been causing a lot of contention. This PR removes the cache altogether, so posting lists are read directly from Badger as needed. Instead of one global LRU cache, each Txn object has a local cache, which is used both for mutations and for queries. Query functions share this local cache.
Pros: We have seen an astounding 5-10x query latency drops due to this PR! I've also seen 1.7x jump in mutation throughput while running the live loader.
Cons: This PR introduces a query local cache, which can potentially cause issues if a query requests for more data than the RAM available in the server. However, that can be dealt with in future PRs.
The `lru_mb` flag has not been removed yet. We intend to use it later when we introduce an LRU cache in Badger.
Changes:
* Remove LRU cache.
* Make query after mutation before commit work. Make tests work.
* Return list from txn.Store
* Fix the query package test failure. Also Txn should always use a local cache.
* No need to commit in memory
* Bring GetNoStore back
* No need to track keys during rolling up.
* Make LocalCache use byte slice instead of string as argument.
0 commit comments