Skip to content

v0.26.0

Latest

Choose a tag to compare

@ernado ernado released this 11 Nov 19:02
d11a957

Requires gotd/td v0.164.0 (https://github.com/gotd/td/releases/tag/v0.164.0). Release post: https://gotd.dev/blog/v0.164.0

Highlights

  • Storage: persistent updates state and access hashes for pebble, bbolt and redis. pebble and bbolt also implement peers.Storage for telegram/peers.
  • Fewer writes: pebble honours its write options and writes a whole update's peers in one batch instead of one fsync per peer. Unchanged peers aren't rewritten.
  • Encoding: a compact binary peer encoding, opt-in with WithBinaryEncoding(). Versions before v0.26.0 can't read it, so turn it on only once you won't roll back.
  • Min users no longer overwrite stored full users.
  • floodwait: concurrent dispatch (a slow request no longer blocks the others), adaptive pacing, policies, exempt methods, retries of 5xx errors and a snapshot for metrics.
  • Fixes: pebble skips only the peers it can't encode in a batch, bbolt iterates channels in a read-only transaction, floodwait uses its clock everywhere and decays the wait after errors.

Upgrading

  • storage.Peer.FromUser returns false for min users.
  • CreatedAt now means "first stored with this content".
  • pebble writes without sync if you passed NoSync write options, which used to be ignored.
  • floodwait runs requests concurrently; it used to send one per tick.
  • bg still works, but gotd's Client.Start replaces it.

All changes

  • chore(deps): bump actions/setup-go from 6.5.0 to 7.0.0 by @dependabot[bot] in #761
  • chore(deps): bump github.com/go-faster/errors from 0.7.1 to 0.8.0 by @dependabot[bot] in #765
  • ci: fix lint and run s3 e2e against go-faster/fs by @ernado in #787
  • feat(pebble,bbolt): persistent updates state and access hashers by @ernado in #785
  • feat(floodwait): long-running features and concurrent dispatch by @ernado in #786
  • fix(storage): do not store min users by @ernado in #783
  • fix(pebble): honour write options and add peers in one batch by @ernado in #784
  • fix(bbolt): iterate channels in a read-only transaction by @ernado in #790
  • fix(floodwait): use WithClock clock in scheduler and decay wait on errors by @ernado in #788
  • fix(pebble): skip only unencodable peers in AddMany by @ernado in #791
  • feat(redis): add updates state storage and access hashers by @ernado in #792
  • feat(pebble,bbolt): add peers.Storage backends by @ernado in #789
  • feat(storage): skip writing unchanged peers in pebble and bbolt by @ernado in #793
  • feat(storage): store peers in a compact binary format by @ernado in #794
  • chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #762
  • chore(deps): bump github/codeql-action from 4 to 4.37.4 by @dependabot[bot] in #767
  • chore(deps): bump github.com/prometheus/client_golang from 1.23.2 to 1.24.1 by @dependabot[bot] in #764
  • chore(deps): bump the opentelemetry group with 3 updates by @dependabot[bot] in #768
  • chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6 by @dependabot[bot] in #795
  • chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @dependabot[bot] in #770
  • chore(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2 by @dependabot[bot] in #777
  • chore(deps): update gotd/td to v0.164.0 by @ernado in #800

Full Changelog: v0.25.0...v0.26.0