[ZODB-Dev] Timeout in UndoSearch

Jeremy Hylton jeremy at zope.com
Thu Jan 15 11:01:44 EST 2004


On Wed, 2004-01-14 at 17:39, Dieter Maurer wrote:
> Someone else suggested to limit the search by transaction
> commit time (rather than searching runtime).
> E.g. give me all "Undo" possibility within the last day/week/month.
> 
> In my view this is much clearer (with respect to its semantics)
> than a limit on search time. When the search time is used
> as limit, I do not know (when the "Undo" comes back with no
> records) whether there are undo records.
> 
> In all cases (however we restrict the search), we should be able to continue 
> the search further down the ZODB until we hit the way of no further
> undo.

Regardless of how we specify the limit, I don't see how the current
undoLog interface can pick up where it left off if it gets no records
back.  It would probably be better if undoLog() returned some indication
of the last record it examined.  Then you could always resume the search
where you left off.  I think this extra data would be storage specific.
You might want a separate indicator for "no more records."

If it was easy to resume where you left off, I like the timeout option. 
When the system is busy, the undo search will get a smaller slice of CPU
time.  When the system is idle, the search will run longer (get more CPU
time).

> This all means: I have strong objections against the proposed patch.

Noted.

> By the way: we can stop looking for "Undo" information
> as soon we reach the first packed transaction.
> This means, that even a several GB storage may not be a problem
> (provided it is packed regularly).

Good point.

Jeremy





More information about the ZODB-Dev mailing list