[zope2-tracker] [Bug 403437] Re: cut&paste into a ZODB Mount Point does not work, if the mount point comes over zeo

Tres Seaver tseaver at palladion.com
Sat Apr 10 13:32:56 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tres Seaver wrote:
> Hmm, that patch breaks a couple of the tests for OFS.CopySupport:
> 
>  - src/OFS/tests/testCopySupportEvents/TestCopySupport:test_3_CutPaste
> 
>  -
> src/OFS/tests/testCopySupportEvents/TestCopySupportSublocation:test_3_CutPaste

Now that I look at it, I don't think your patch can be correct for all
cases:  it changes the semantics of a paste with 'op == 1' from "move
the pasted object from one location to annother" to "clone the pasted
object into the new location, then delete the original in the old
location."  This change will break object references, for instance, in
the very common case that the object is being moved inside a single
storage:  the old object will still be referenced, even though no longer
reachable at its old place.

Perhaps that change of semantics is necessary when moving objects from
one storage to another (somewhat like moving a file between
filesystems), but should be guarded by a check that the connection for
the source and destination containers differs:  if not, then the
existing object should be used without a clone.

We might want to emit a warning in the case of a move-turned-clone, as
well.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvAtkMACgkQ+gerLs4ltQ6kKgCg3FtAAuOvt5s1eRE9F6Wy30WZ
oVcAniPQ7inPLQr1LR3+EQkNFsxRnf7B
=lua3
-----END PGP SIGNATURE-----

-- 
cut&paste into a ZODB Mount Point does not work, if the mount point comes over zeo
https://bugs.launchpad.net/bugs/403437
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list