v3.14.0 #1099
Tochemey
announced in
Announcements
v3.14.0
#1099
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🚀 Oveview
This release brings multi-datacenter support, a high-performance protobuf-over-TCP remoting stack, and important fixes for channel pooling, timeouts, and data races. It also adds an option to disable grain relocation and several allocation and lock optimizations across the hot paths.
✨ What's New
🌐 Multi-datacenter support
SpawnOnand theWithDataCenteroption.datacenterpackage andWithDataCenterfor details.🛡️ Grain relocation control
WithGrainDisableRelocation— disable actor/grain relocation when you don’t need it (e.g. stateless actors or short-lived grains).🐛 Bug Fixes
ShutdownpreShutdownno longer builds or persists peer state when relocation is disabled (WithoutRelocation), so shutdown proceeds correctly and avoids unnecessary cluster work.Channel poolGrainContext.NoErr(): sending on both response and error channels for sync calls could corrupt the pool under scheduling races.TimeoutslocalSendtimeout/cancel paths returning channels to the pool while the grain goroutine could still write, preventing stale values in later requests.Data racePID.recordProcessedMessage()by replacing the runtime type assertion onpassivationStrategywith anatomic.Boolset at init.⚡ Performance & Remoting
🌐 New remoting stack (protobuf over TCP)
ConnectRPC/HTTP-based remoting is replaced with a protobuf-over-TCP server and connection-pooling client:
SO_REUSEPORT,TCP_FASTOPEN, andTCP_DEFER_ACCEPTfor lower connection-setup latency and kernel-level load balancing.WorkerPoolfor connection dispatch, reducing contention under high concurrency.FramePoolwith power-of-two bucketedsync.Pool(256 B – 4 MiB) for read buffers and frame slices to cut heap allocations and GC pressure.ConnWrappercompression (Zstandard, Brotli, Gzip) on both client and server.♻️ Pooling & allocation
sync.PoolforReceiveContext,GrainContext, and response/error channels on theTell,Ask,SendAsync, andSendSynchot paths to avoid cross-P thrashing and madvise overhead.PID.latestReceiveTimeNanoswitched fromatomic.Timetoatomic.Int64(Unix nanoseconds) to remove ~24-byte interface allocations per message.Address.String()andGrainIdentity.String()to avoid repeatedfmt.Sprintfon every message.UnboundedMailboxandgrainMailboxuse plain pointers instead ofatomic.Pointeron enqueue/dequeue.deferclosures in Ask-path functions (PID.Ask,actor.Ask,handleRemoteAsk, grainlocalSend) to remove per-call closure allocations.🔓 Locking & contention
ActorOfdoes local actor lookup before taking the system-wideRWMutex;SendAsync/SendSyncbypass thePID.ActorSystem()getter lock, reducing read-lock acquisitions from three to one on the local path.passivationManager.Touchcoalesced via an atomic timestamp guard (lastPassivationTouch), so mutex contention drops from once-per-message to at most once per 100 ms.📦 Upgrade notes
WithGrainDisableRelocationwhen you want to skip relocation for certain grains.datacenterpackage andWithDataCenterwithSpawnOn.🔗 Pull requests
Features & refactors
Dependencies & tooling
github.com/zeebo/xxh3→ v1.1.0 — @renovate[bot] in #1088actions/checkout→ v6.0.2 — @renovate[bot] in #1086golangci/golangci-lint→ v2.8.0 — @renovate[bot] in #1087github.com/redis/go-redis/v9→ v9.17.3 — @renovate[bot] in #1089github.com/bufbuild/buf→ v1.64.0 — @renovate[bot] in #1091github.com/klauspost/compress→ v1.18.4 — @renovate[bot] in #1093github.com/bufbuild/buf→ v1.65.0 — @renovate[bot] in #1098Full Changelog: v3.13.0...v3.14.0
All reactions