Releases: go-macaron/session
Releases · go-macaron/session
v1.0.4: Skip Release for sessions that were not mutated
The file provider (and others that persist via Encode in Release) writes the session unconditionally at the end of every request. Two concurrent reads of the same session ID then race: each request encodes its stale snapshot and writes it back, so an in-flight mutation from a third request can be clobbered. Track Set/Delete/Flush calls on a wrapper around the per-request RawStore and skip Release when nothing was written. Reads no longer touch the backing store, eliminating the race for read-only traffic.