[Checkins] [zopefoundation/ZODB] 56c96a: FileStorage: Report problem on read-only open of n...

GitHub noreply at github.com
Sat Apr 8 21:12:34 CEST 2017


  Branch: refs/heads/4
  Home:   https://github.com/zopefoundation/ZODB
  Commit: 56c96a113a956a6a11a23ddbc791655f67e99a68
      https://github.com/zopefoundation/ZODB/commit/56c96a113a956a6a11a23ddbc791655f67e99a68
  Author: Kirill Smelkov <kirr at nexedi.com>
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
    M src/ZODB/FileStorage/FileStorage.py
    M src/ZODB/tests/testConfig.py
    M src/ZODB/tests/testFileStorage.py

  Log Message:
  -----------
  FileStorage: Report problem on read-only open of non-existent file

... instead of silently creating empty database on such opens.

Use-case for this are utilities like e.g. zodbdump and zodbcmp which
expect such storage opens to fail so that the tool can know there is no
such storage and report it to user.

In contrast current state is: read-only opens get created-on-the-fly
empty storage with no content, but which can be iterated over without
getting any error.

This way e.g. `zodbdump non-existent.fs` produces empty output _and_
exit code 0 which is not what caller expects.

(cherry picked from commit 30bbabf19e837b4ca9e35fab5d5c1278b078fe45)


  Commit: c9f750f3d2ac9dbc141a966003c16163a01be61a
      https://github.com/zopefoundation/ZODB/commit/c9f750f3d2ac9dbc141a966003c16163a01be61a
  Author: Jim Fulton <jim at jimfulton.info>
  Date:   2017-04-08 (Sat, 08 Apr 2017)

  Changed paths:
    M CHANGES.rst

  Log Message:
  -----------
  Changelog for PR #153

This backports the following commits:
  6d6730574934d4ffa08b6afccb4d3bde6cf46194
  244bb92b06770da76805696a6c0ebd815bf67bc9


Compare: https://github.com/zopefoundation/ZODB/compare/60ce57953a20...c9f750f3d2ac


More information about the checkins mailing list