Commit Graph
5 Commits
Author SHA1 Message Date
Chris Lu 33c36fc7a3 perf(weed/storage/needle): intern the stored ttl values (#10611)
The master decodes a TTL per volume in every heartbeat and keeps it for the
volume's lifetime, so a cluster using TTLs carries one two-byte object per
volume replica where at most 256 counts times 7 units exist. Share them, and
decode the uint32 form directly instead of staging it through a byte slice.

Clusters that set no TTL are unaffected; that path already returned the shared
EMPTY_TTL.

BenchmarkSyncDataNodeRegistration/100000Volumes, volumes carrying a ttl
  600600 allocs/op -> 500597 allocs/op
2026-08-07 00:51:52 -07:00
bwlfhu 0e08b83521 Fix volume ttl (#6683) 2025-04-02 07:59:21 -07:00
Chris Lu b219ccfe68 Update volume_ttl_test.go 2020-12-03 12:55:44 -08:00
Chris Lu dbb10e0f0b testing with more than 30days 2020-08-31 17:59:29 -07:00
Chris Lu e5506152c0 refactoring 2019-04-18 21:43:36 -07:00