Skip to content
Merged
Changes from all commits
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
4 changes: 1 addition & 3 deletions BitFaster.Caching/Lfu/ConcurrentLfu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ IEnumerator IEnumerable.GetEnumerator()

private void TryScheduleDrain()
{
if (this.drainStatus.NonVolatileRead() >= DrainStatus.ProcessingToIdle)
if (this.drainStatus.VolatileRead() >= DrainStatus.ProcessingToIdle)
{
return;
}
Expand Down Expand Up @@ -832,8 +832,6 @@ private bool AdmitCandidate(K candidateKey, K victimKey)
int victimFreq = this.cmSketch.EstimateFrequency(victimKey);
int candidateFreq = this.cmSketch.EstimateFrequency(candidateKey);

//var (victimFreq, candidateFreq) = this.cmSketch.EstimateFrequency(victimKey, candidateKey);

// TODO: random factor when candidate freq < 5
return candidateFreq > victimFreq;
}
Expand Down