Skip to content

Commit

Permalink
[Chore] Improve expiry policy
Browse files Browse the repository at this point in the history
  • Loading branch information
maypok86 committed Dec 11, 2023
1 parent 7b6eb47 commit 9bb76dc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/expire/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

const (
numberOfBuckets = 16
numberOfBuckets = 128
mask = uint64(numberOfBuckets - 1)
base = uint64(10)
base = uint64(5)

// eliminate probing.
maxProbeCount = 100
Expand All @@ -19,10 +19,6 @@ const (
mapSize = 100
)

func timestampToBucketID(timestamp uint64) int {
return bucketTimeToBucketID(timestampToBucketTime(timestamp))
}

func bucketTimeToBucketID(bucketTime uint64) int {
return int(bucketTime & mask)
}
Expand Down

0 comments on commit 9bb76dc

Please sign in to comment.