Heads-up: MogileFS and Memcached weirdness

Robin H. Johnson robbat2 at gentoo.org
Sun Jun 24 10:06:40 UTC 2007


While tracing a Postgres bug, I ran into a bit of weirdness, that
anybody using mogilefs with memcache via the memcache_servers setting
should be aware of.

I'm not fixing it right now, hence this email to warn folks about it.

It's most easily displayed with mogtool, where an inject seems to wait
forever for a replication to take place, on slightly large files (I can
manage it with anything over 4Mb).

1. Client adds file to MogileFS.
2. Client uses get_paths($key, {noverify => 1}) to check status.
3. Server caches the paths and returns to client. There is only one path
   in the result.
4. Server now continues replicating, but the memcache key is not updated.
5. Client sees that there is only one path, sleeps a while, and asks
   again.
6. Server gets the next request from the client, and uses the cached
   (now incorrect) version that still only shows a single path.
7. Repeat 5 & 6 until the memcached key times out.

To properly fix this, we need to invalidate the memcache key for
mogdevids:<fidid> whenever replication or deletion is successful.

This requires more memcache work while I'm busy trying to get Postgres
working, so I'll only get around to it later.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Council Member
E-Mail     : robbat2 at gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 321 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/mogilefs/attachments/20070624/cf573141/attachment.pgp


More information about the mogilefs mailing list