Will the 'set' and the 'get' operation conflict?
Clint Webb
webb.clint at gmail.com
Wed Aug 1 00:59:47 UTC 2007
it should be alright if the individual items are atomic. however, if
for example you need to set 5 items and you dont want any of them
accessed until they have all been set, then you would want to use
locking. there are examples elsewhere on how to make your operation
exclusive and atomic.
On 8/1/07, Josh McFarlane <josh.mcfarlane at gmail.com> wrote:
> On 7/31/07, Marcus Rueckert <darix at web.de> wrote:
> > > Under classic memcached, no two operations are executed at the
> same
> > > time (it's single-threaded). I don't fully understand the new multi-
> > > threaded code, but it's probably safe to assume that no two
> > > operations touch the same cache element at the same time.
> >
> > i think the bigger issue for him are 2 different server accessing the
> > same memcached element.
>
> It shouldn't matter if you have 2 or 200 servers accessing the same
> element. Assuming your hashing is stable across all client servers, it
> will end up requesting it from only one memcached instance, and that
> memcached instance should ensure that each request is synchronized and
> does not cause a collision.
>
> --
> Josh McFarlane
>
--
"Be excellent to each other"
More information about the memcached
mailing list