[ZODB-Dev] Pack problem
    Jim Fulton 
    jim at zope.com
       
    Mon Jun 30 17:11:17 CEST 2014
    
    
  
On Mon, Jun 30, 2014 at 10:44 AM, Alessandro Pisa
<alessandro.pisa at gmail.com> wrote:
> On 30 June 2014 16:02, Alessandro Pisa <alessandro.pisa at gmail.com> wrote:
>> On 30 June 2014 15:42, Jim Fulton <jim at zope.com> wrote:
>>> On Mon, Jun 30, 2014 at 8:24 AM, Alessandro Pisa
>>>
>>> I suggest using the file-store iterator to look at the transaction
>>> timestamps.
>>>
>
> This is what I got
>
> [root at zeoserver]# cat scripts/test_tids.py
> from ZODB.FileStorage import FileIterator
> it = FileIterator('var/filestorage/Data.fs')
> print 'Size %s' % it._file_size
> last = None
> counter = 0
> for t in it:
>     if last is not None:
>         if t.tid <= last:
>             import pdb; pdb.set_trace()
>             print 'wtf', repr(t.tid)
>     counter += 1
>     last = t.tid
> print 'Last transaction: %s-%s' % (t._tpos, t._tend)
> print 'Transactions: %s' % counter
> [root at zeoserver]# ./bin/zopepy scripts/test_tids.py
> Size 67395884639
> Last transaction: 67392229872-67395884631
> Transactions: 1275366
>
> It seems that tids are in order :/
Then I suggest seeing if any are in the future.
You can create a tid for now with repr(ZODB.TimeStamp.TimeStamp(Y, M.
D, h, m, s))
Jim
-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
    
    
More information about the ZODB-Dev
mailing list