[ZCM] [ZC] 1309/ 5 Comment "ZODB.DB.DB.cacheExtremeDetail reports
wrong reference count"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Thu May 6 16:26:52 EDT 2004
Issue #1309 Update (Comment) "ZODB.DB.DB.cacheExtremeDetail reports wrong reference count"
Status Accepted, Database/bug low
To followup, visit:
http://zope.org/Collectors/Zope/1309
==============================================================
= Comment - Entry #5 by tim_one on May 6, 2004 4:26 pm
I think I'm hung up trying to guess what this stuff thinks it's *trying* to achieve. If it wants to return the object's true Python refcount, then s/4/3/ is correct. If it's trying to show a fudged refcount, based on some undocumented goal, then anything goes. I suppose the story is that it's trying to show what the true refcount *would* have been if the cache didn't exist? That's the only way I can make sense of what you're saying (and that's fine, if that is indeed what it's trying to do).
________________________________________
= Comment - Entry #4 by d.maurer on May 5, 2004 5:23 pm
It is too small only for ghost objects.
1. It subtracts 4 because (for non ghost objects) the cache keeps an additional reference
2. for non-ghosts, the cache keeps an additional reference, for ghosts, it does not
________________________________________
= Comment - Entry #3 by tim_one on May 4, 2004 4:33 pm
I'm pretty baffled by this code. Do you think it's too small *only* for ghost objects, or for all objects? I count 3 temp references due to the routine itself: being bound to name "ob", passing ob to sys.getrefcount(), and appearing once in the con._cache_items() list. So I'm unclear on two things:
1. Why the routine subtracts 4.
2. Why there should be (or is) a difference between
ghost and non-ghost objects.
It's easy to s/4/3/, but if that does a wrong thing for non-ghosts, it's not a right thing to do.
________________________________________
= Assign - Entry #2 by tim_one on May 4, 2004 2:31 pm
Status: Pending => Accepted
Supporters added: tim_one
Assigned to me.
________________________________________
= Request - Entry #1 by d.maurer on May 4, 2004 4:44 am
The reference count reported by
ZODB.DB.DB.cacheExtremeDetails is by 1 too low for ghost objects
==============================================================
More information about the Zope-Collector-Monitor
mailing list