Files
skillshare/internal
Willie 5dd83a8412 fix(server): guard metadata store access against concurrent requests
Every API request reloads the skills and agents metadata stores and
swaps the server's pointers under s.mu, but several handlers read or
wrote the stores outside that lock: listing, skill detail, check, the
update stream, and the hash refresh after setting targets. Concurrent
requests could race on the pointer or on the stores' maps, which the
race detector reported hundreds of times under load and which can
crash the server with a concurrent map access.

Store access now always happens under s.mu. Reads return a copy of
the entry so it can be used after unlocking, and target handlers hash
files outside the lock and only write the result under it.
2026-09-26 21:12:57 +08:00
..
2026-06-05 13:56:07 +08:00
2026-04-14 18:16:11 +08:00