bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com
Apache License 2.0
660 stars 99 forks source link

Acquire semaphore outside of goroutine for resyncs #668

Closed ericvolp12 closed 4 months ago

ericvolp12 commented 4 months ago

Currently we end up with millions of goroutines waiting on semaphores during a full PDS resync if we run against all production PDSs, this fix waits for the semaphore before spawning the goroutine reducing allocs and the size of the stack significantly.