Skip to content

Commit

Permalink
Fix blob cache race, decay, time dependency
Browse files Browse the repository at this point in the history
This commit addresses 3 problems in the blob cache:

* Fix a race during initChunk where the result would be a fallback to direct read.
* Fix a bug in computeDecay that led to only decaying the first item per frequency.
* Remove the time dependency of the cache by moving to a logical clock (epochs)

Trigger decay whenever freq0 is empty, ensuring we decay slowly/rapidly as needed.

Divide time into epochs, switch to new one whenever we need to decay. A region
now promotes 2 freqs per access but only once per epoch

Co-authored-by: Tanguy Leroux <tlrx.dev@gmail.com>
  • Loading branch information
henningandersen and tlrx committed Jan 26, 2024
1 parent 79b7dbb commit 3018d96
Show file tree
Hide file tree
Showing 2 changed files with 373 additions and 148 deletions.
Loading

0 comments on commit 3018d96

Please sign in to comment.