[Checkins] [zopefoundation/ZODB] 32bdbc: fstail: print the txn offset and header size, inst...

GitHub noreply at github.com
Sun Jul 10 20:31:48 CEST 2016


  Branch: refs/heads/fstail-offset
  Home:   https://github.com/zopefoundation/ZODB
  Commit: 32bdbc17157cf11bbe53e639738aa250ac88c3b1
      https://github.com/zopefoundation/ZODB/commit/32bdbc17157cf11bbe53e639738aa250ac88c3b1
  Author: Julien Muchembled <jm at nexedi.com>
  Date:   2016-07-10 (Sun, 10 Jul 2016)

  Changed paths:
    M src/ZODB/fstools.py
    M src/ZODB/scripts/fstail.py
    M src/ZODB/scripts/tests/fstail.txt
    M src/ZODB/scripts/tests/test_doc.py

  Log Message:
  -----------
  fstail: print the txn offset and header size, instead of only the data offset

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.




More information about the checkins mailing list