From 55a49682096401a27e20fe96d49a45f7a50d9256 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 27 Dec 2012 11:20:56 -0800 Subject: [PATCH] Apply a bandaid for _dirties being stuck in memcached. --- r2/r2/lib/db/thing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/r2/lib/db/thing.py b/r2/r2/lib/db/thing.py index e2a6bc60a..4436496ac 100644 --- a/r2/r2/lib/db/thing.py +++ b/r2/r2/lib/db/thing.py @@ -418,6 +418,10 @@ class DataThing(object): bases[i] = items_db([i]).values()[0] bases[i]._cache_myself() + if bases[i] and bases[i]._dirties: + g.log.error("Got _dirties back from the cache for %r. Cleaning up.", bases[i]) + bases[i]._dirties.clear() + bases[i]._cache_myself() if data: need = []