[Checkins] [zopefoundation/ZODB] 26a04c: Don't seek on imports

GitHub noreply at github.com
Sat Feb 10 19:56:59 CET 2018


  Branch: refs/heads/import-no-seeks
  Home:   https://github.com/zopefoundation/ZODB
  Commit: 26a04c75c9d602ef0cd507a66b43553d34a063c3
      https://github.com/zopefoundation/ZODB/commit/26a04c75c9d602ef0cd507a66b43553d34a063c3
  Author: Jim Fulton <jim at jimfulton.info>
  Date:   2018-02-10 (Sat, 10 Feb 2018)

  Changed paths:
    M src/ZODB/ExportImport.py

  Log Message:
  -----------
  Don't seek on imports

(other than the possible seek for custom importers)

We were seeking to handle blob markers. This has two major drawbacks:

1. It wasn't possible to use a non-seekable file.  A use case for
   export/import is to copy database data.  An intermediate file, and
   associated I/O, could be avoided using a pipe, but pipes aren't
   seekable.

2. Seeks cause file-buffer data to be discarded, making IO far more
   expensive.

We didn't really need blob markers, because the preceeding blob data
records serve as markers.  (Now we're stuck with them for backward
compatibility.)




More information about the checkins mailing list