Chris Withers wrote:
Dieter Maurer wrote:
You should be happy about the much more explicit information.
It may allow you to analyse your problem better.


This question has nothing to do with that problem, it just came up as a result of once again being reminded that we use timestamps as transaction ids.

It would be more correct to say that we base transaction ids on timestamps.

For example, these timestamps precisely tell you from when
the doubled transaction entries come. It may help you to verify
that they come from a single incremental backup file.

Yes, but using timestamps also means:

- we're dependent on the system clock being accurate for no good reason

I'm hoping that Jeremy or Tim will chime in, since we considered switching
to integers a while back.

- under high load, we have to deal with the possibility of duplicate transaction ids

This is not the case.  A storage guarantees that time stamps are unique,
incrementing time stamps, if necessary, to do so.

I'm wondering why we take on those issues rather than just use an incrementing integer sequence instead?

Note that originally, transaction ids were not required to be
based on time stamps. In fact, I don't know that they are required
to be based on time stamps and I don't know where to find this out. :(

(ZODB is really in need of some Zope3-style cleanup, without
 Zope3-style reimplementation and refactoring.)

My original intent was that transaction ids would be opaque strings.
Note that, until MVCC, transaction ids were largely internal implementation
details of storages.

With MVCC, transaction ids have to be monotonically increasing
and must be the same as serials.

Long ago, in a fit of laziness on my part, we began leveraging the
fact that serials were time stamps to display object modification times.
If we switched to integers, this would break.  This isn't to say that we
shouldn't fix this, but doing so would entail some significant disruption.
I would go so far to say that the benefit isn't worth the cost for
FileStorage.

Jim

--
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://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

Reply via email to