[horde] Horde 3.1, memcache sessionhandler, sidebar, and flock()

Chuck Hagenbuch chuck at horde.org
Wed Dec 27 17:38:41 PST 2006


Quoting Chris Stromsoe <cbs at cts.ucla.edu>:

> Right now, the code is structured to always obtain an exclusive lock
> (LOCK_EX).  Is that necessary?  Is there any reason that read()
> doesn't obtain a shared lock (LOCK_SH) instead?

Otherwise you get:

- page 1 loads session data
- page 2 loads session data
- page 1 changes session data
- page 1 locks for write
- page 1 writes changed session data
- page 2 locks for write
- page 2 writes UNCHANGED session data

-chuck

--
"we are plastered to the windshield of the bus that is time." - Chris


More information about the horde mailing list