Discussion:
[Erp5-dev] there is code destroying data into ERP5 currently
Sébastien Robin
2007-09-13 09:45:37 UTC
Permalink
Hi,

There is code destroying data into ERP5Type/Core/Folder.py

You have been warned, revisions upper than 16294 WILL DESTROY DATA.

We will fix it today.

Seb.
--
Sebastien Robin, Nexedi Project Manager
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
bartek
2007-09-18 09:47:31 UTC
Permalink
Post by Sébastien Robin
Hi,
There is code destroying data into ERP5Type/Core/Folder.py
You have been warned, revisions upper than 16294 WILL DESTROY DATA.
We will fix it today.
Is it already fixed? Is it safe now to upgrade? Basically, what is the
status of HEAD now - is it more or less usable, or does it still contain
some ultra-experimental stuff?

Bartek
Post by Sébastien Robin
Seb.
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Łukasz Nowak
2007-09-18 14:14:01 UTC
Permalink
Hello,

On 2007-09-18, 11:47:31
Post by bartek
Is it already fixed? Is it safe now to upgrade? Basically, what is
the status of HEAD now - is it more or less usable, or does it still
contain some ultra-experimental stuff?
I'm currently upgrading copy of our production system to rev 16456 and
for now no object is disappearing and no problems spotted.

BTW - wouldn't be good to create HowToUpgrade page on wiki? To point
problems with workflows, business template overriding and create some
kind of "good upgrade scenario"?

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
Jean-Paul Smets
2007-09-18 15:13:58 UTC
Permalink
Post by bartek
Post by Sébastien Robin
Hi,
There is code destroying data into ERP5Type/Core/Folder.py
You have been warned, revisions upper than 16294 WILL DESTROY DATA.
We will fix it today.
Is it already fixed? Is it safe now to upgrade? Basically, what is the
It should be. About 10 developers currently use the head branch.
Post by bartek
status of HEAD now - is it more or less usable, or does it still contain
some ultra-experimental stuff?
HEAD does not contain ultra-experimental code or does not use
experimental code (we keep such code away). The incident of last week
happened although the code which was committed had been unit tested and
atlhough we had tested upgrade (but not enough) before committing. It
was a complex situation. We are really sorry.

The nice thing with Zope is that it is always possible to revert
database transactions and recover lost data.

Regards,

JPS.
Post by bartek
Bartek
Post by Sébastien Robin
Seb.
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Pelletier Vincent
2007-09-18 16:04:53 UTC
Permalink
Post by Sébastien Robin
There is code destroying data into ERP5Type/Core/Folder.py
BTW I *think* the code did not actually destroy data.

What it did was to store a folder-handling plugin instance on the folder when
folder instance gets modified.
As long as this plugin instance is not there, folder behaves like usually, but
as soon as it's there its methods are called... on the plugin instance.

Which means that instead of searching for subobjects on the Folder (where they
still are) it searched for them on the plugin instance, where there is none
(actually, there is just the one just added).

I have *NOT* checked this assumption, but it popped into my mind when I took a
look at Sebastien's fix and comparing to original code.

If this is true, reverting the Folder code to previous version should make
seemingly-lost objects pop up again, but the downside is the apparent (again)
disapearance of all objects created with the new code...
--
Vincent Pelletier
Yusei TAHARA
2007-09-18 16:40:16 UTC
Permalink
Hi.
Post by Pelletier Vincent
If this is true, reverting the Folder code to previous version should make
seemingly-lost objects pop up again, but the downside is the apparent (again)
disapearance of all objects created with the new code...
No, lost objects does not pop up again. I already try this approach last week,
and failed. I read the code. it does clear btree object so that objects is cleared.
but, of course, we can find lost objects from Data.fs. it keeps old transactions,
even if you cannot undo from ZMI.
--
Yusei TAHARA <yusei at nexedi.com>
Loading...