Packing bug?

"Matt Hamilton" <[email protected]>
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <46279.147.114.226.175.1108128010.squirrel@mail.testbed.netsight.co.uk>
Hi all,
  Been trying to track down a bug recently on a client's site in which
after a pack we are getting POSKey errors.  My initial thoughts were
related to the file ownership bug I found before, but this appears
different.

One of the objects removed completely is the ZMI control panel, which has
an oid of 0x3, so should probably stick around :)

I put some extra logging in the mark/unmark methods and switched on
pretend=1 on Full.py and all seemed to look as planned.  0x3 was unmarked
with everything at the start and then marked later on.  Having though I
had fixed the problem, I set pretend=0 and tried again, but this time 0x3
gets unmarked at the start of Stage 4!  Looking at the code for stage 4 I
see, Full.py L763:

  if mc.is_marked(path):
     if pretend:
       print >> sys.stderr, 'packing would keep %r' % (path,)
     else:
       mc.maybe_unmark(path)

and maybe_unmark = unmark in the PermissionsMarker (the marker we are using).

So the above logic seems to say: 'if the file is marked and we are not in
pretend mode, unmark it'.  Doesn't this seem a bit odd?  I assume this is
such that all files are unmarked by the end of the packing, but I'm
guessing that somehow the same path comes up again and this time as it is
unmarked, it is renamed -deleted.

I don't see why the same file would go though this again, but somehow it
looks like it does.

-Matt

-- 
Matt Hamilton                                         [email protected]
Netsight Internet Solutions, Ltd.          Business Vision on the Internet
http://www.netsight.co.uk                               +44 (0)117 9090901
Web Design | Zope/Plone Development and Consulting | Co-location | Hosting




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.