• Julien Muchembled's avatar
    fstail: print the txn offset and header size, instead of only the data offset · 3807ace8
    Julien Muchembled authored
    Before:
    
        2016-07-01 09:41:50.416574: hash=d7101c5ee7b8e412d7b6d54873204421e09b7f34
        user='' description='' length=1629 offset=58990284
    
    After:
    
        2016-07-01 09:41:50.416574: hash=d7101c5ee7b8e412d7b6d54873204421e09b7f34
        user='' description='' length=1629 offset=58990261 (+23)
    
    The structure of a FileStorage DB is such that it's easy to revert the last
    transactions, by truncating the file at the right offset. With the above
    change, `fstail` can now be used to get this offset.
    
    In the above example:
    
        truncate -s 58990261 Data.fs
    
    would delete the transaction and all those after.
    3807ace8