Skip to content

v1.2.0

Latest

Choose a tag to compare

@sethvargo sethvargo released this 17 Jul 21:56
· 1 commit to main since this release
v1.2.0
294f8d8

Performance

memorystore now stores buckets in a sync.Map. Profiling showed the old global RWMutex read lock was the bottleneck under concurrency: every Take mutated one shared atomic counter, so all cores bounced that cache line. The concurrent, many-key Take path is up to ~6x faster, and go-limiter is now the fastest per-key rate limiter in the comparison suite.

Go 1.25

The module now requires Go 1.25. The separate tools/ module and the lint apparatus are gone in favor of plain go test.

Bug fixes

  • memorystore.Set with a zero interval no longer panics (divide-by-zero in tick); it falls back to the store's configured interval.
  • httplimit emits the rate-limit reset and Retry-After headers as valid RFC 9110 HTTP-dates in GMT (http.TimeFormat) instead of ... UTC.
  • bucket burst is now a saturating add, so a large burst can't overflow a uint64 and wrap to a smaller value.

Notes

  • memorystore.Config.InitialAlloc is now a no-op (retained for compatibility). sync.Map has no pre-sizing.

Full changelog: v1.1.0...v1.2.0