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 = []