Skip to content

Rewrite TTL buckets module#13

Merged
thinkingfish merged 2 commits intopelikan-io:mainfrom
brayniac:brayniac/rewrite-ttl-buckets
Apr 18, 2026
Merged

Rewrite TTL buckets module#13
thinkingfish merged 2 commits intopelikan-io:mainfrom
brayniac:brayniac/rewrite-ttl-buckets

Conversation

@brayniac
Copy link
Copy Markdown
Contributor

Summary

  • Rewrite all 5 files in ttl_buckets/ with clean implementations
  • Same 4-tier logarithmic bucketing algorithm (1024 buckets)
  • Same API surface — no caller changes needed
  • Named constants replace magic numbers for tier widths and boundaries
  • Added doc comments with ASCII layout diagram for TtlBucket struct

Test plan

  • cargo test --workspace — 88 tests pass
  • cargo test -p segcache --features debug — 55 tests pass
  • cargo clippy --workspace --all-features --all-targets -- -D warnings — clean
  • cargo fmt --all --check — clean

🤖 Generated with Claude Code

brayniac and others added 2 commits April 18, 2026 10:58
Rewrite all 5 files in ttl_buckets/ with the same bucketing algorithm
(4-tier logarithmic mapping, 1024 buckets) and same API surface. Named
constants replace magic numbers for tier widths and boundaries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brayniac brayniac requested a review from thinkingfish April 18, 2026 18:28
@thinkingfish thinkingfish merged commit 9cb651d into pelikan-io:main Apr 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants