RE: [ZODB-Dev] In-memory storage with undo ability?

2007-01-16 Thread Dieter Maurer
Rooney, Mike (ext. 324) wrote at 2007-1-15 15:49 -0500:
 ...
raise MultipleUndoErrors(failures.items())
MultipleUndoErrors: Undo error 0x15e1: Undo error 0x15e1: _loadBack() failed

The actual line in FileStorage.py in _txn_undo_write that is raising the 
exception is:
   p, prev, v, snv, ipos = self._transactionalUndoRecord(h.oid, pos, 
 h.tid, h.prev, h.version)


The ZODB can only undo changes to an object when there is no later change
to this object that should not be undone.

That's natural.

However, I expect that the ZODB contains some bug that lets
the undo fail even when there are no such object changes.

I also see occasional invalid back pointer warnings when
the index of a FileStorage is rebuild and it may be possible
that the two problems are related.



-- 
Dieter
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


RE: [ZODB-Dev] In-memory storage with undo ability?

2007-01-15 Thread Rooney, Mike (ext. 324)
If Jim is not right (and DemoStorage does not support undo),
then it would not be difficult to derive a RamFileStorage from
FileStorage that exactly works like FileStorage but have its
file implemented as a StringIO (rather than a file on the file system).

Thanks for the clever suggestion! I have implemented a StringIOStorage
with apparent success.

On another note, a problem appeared however when changing
the objects that were persisted and I assumed it to be the fault of
my StringIOStorage but when I tried reverting abd using a FileStorage
the same error occurred.

  File C:\Documents and Settings\user\Desktop\smarttree-2.5\database.py, line 
25, in commit
transaction.commit()
  File C:\python25\Lib\site-packages\transaction\_manager.py, line 99, in 
commit
return self.get().commit(sub, deprecation_wng=False)
  File C:\Python25\Lib\site-packages\transaction\_transaction.py, line 407, 
in commit
self._commitResources()
  File C:\Python25\Lib\site-packages\transaction\_transaction.py, line 506, 
in _commitResources
rm.commit(self)
  File C:\Python25\Lib\site-packages\transaction\_transaction.py, line 642, 
in commit
self.manager.commit(o, txn)
  File C:\Python25\Lib\site-packages\ZODB\DB.py, line 747, in commit
tid, oids = self._db._storage.undo(self._tid, t)
  File C:\python25\Lib\site-packages\ZODB\FileStorage\FileStorage.py, line 
1117, in undo
return self._txn_undo(transaction_id)
  File C:\python25\Lib\site-packages\ZODB\FileStorage\FileStorage.py, line 
1126, in _txn_undo
tindex = self._txn_undo_write(tpos)
  File C:\python25\Lib\site-packages\ZODB\FileStorage\FileStorage.py, line 
1205, in _txn_undo_write
raise MultipleUndoErrors(failures.items())
MultipleUndoErrors: Undo error 0x15e1: Undo error 0x15e1: _loadBack() failed

The actual line in FileStorage.py in _txn_undo_write that is raising the 
exception is:
p, prev, v, snv, ipos = self._transactionalUndoRecord(h.oid, pos, 
h.tid, h.prev, h.version)

Since there is an error for this and the errors are put into a
dictionary and such, I assume this is not all that rare to
occur. Is there a common reason this happens that anyone might
be able to clue me in on?

Thanks,
Mike
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] In-memory storage with undo ability?

2007-01-11 Thread Dieter Maurer
Rooney, Mike (ext. 324) wrote at 2007-1-10 17:01 -0500:
Hi everyone, I have what I imagine is a pretty simple question. I am looking
for a type of storage class (like FileStorage) which allows for undoing
but stays in memory instead of on disk. If DemoStorage supported undo
it would work but it does not appear to in ZODB 3.6.

If Jim is not right (and DemoStorage does not support undo),
then it would not be difficult to derive a RamFileStorage from
FileStorage that exactly works like FileStorage but have its
file implemented as a StringIO (rather than a file on the file system).



-- 
Dieter
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] In-memory storage with undo ability?

2007-01-10 Thread Jim Fulton


On Jan 10, 2007, at 5:01 PM, Rooney, Mike (ext. 324) wrote:

Hi everyone, I have what I imagine is a pretty simple question. I  
am looking
for a type of storage class (like FileStorage) which allows for  
undoing

but stays in memory instead of on disk. If DemoStorage supported undo
it would work but it does not appear to in ZODB 3.6.


DemoStorage does (or should) support undo.

Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev