• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / ZODB
76%
master: 84%

Build:
Build:
LAST BUILD BRANCH: 6.0.1
DEFAULT BRANCH: master
Repo Added 12 Jul 2016 05:44PM UTC
Files 116
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH extension_bytes
branch: extension_bytes
CHANGE BRANCH
x
Reset
  • extension_bytes
  • 3.10.7
  • 350-fix-bytes-vs-text
  • 5.0.1
  • 5.1.0
  • 5.1.1
  • 5.2.0
  • 5.2.1
  • 5.2.2
  • 5.2.3
  • 5.2.4
  • 5.3.0
  • 5.4.0
  • 5.5.0
  • 5.5.1
  • 5.6.0
  • 5.7.0
  • 5.8.0
  • 5.8.1
  • 6.0
  • 6.0.1
  • add-py38
  • agroszer-clean-leaks
  • agroszer-typo
  • all-repos_autofix_all-repos-sed
  • appveyor
  • appveyor-mock
  • be-less-negative
  • blob-default-permissions
  • blob_tests
  • bytes_for_all_tids
  • cleanup-check_checkCurrentSerialInTransaction
  • closure
  • config-with-pure-python
  • config-with-pure-python-template-12d1a05d
  • config-with-pure-python-template-1404d28b
  • config-with-pure-python-template-6f887812
  • config-with-pure-python-template-b21fbbf2
  • config-with-pure-python-template-babc889c
  • coveralls
  • data-for-TransactionMetaData-and-TransactionRecord
  • dataflake/gh-actions
  • davisagli-pack-error-oid
  • doc-292-volatile-attributes
  • drop34
  • faster-bush-oid-to-path
  • feature/faster-tests
  • fix-py310-deprecation-warnings
  • fix-recursion
  • fix_UnboundLocalError
  • fix_memleak_with_closed_connections
  • fix_racetests
  • fixup-pr307
  • fsdump_fsstats#354
  • get-ghost
  • handle_serial
  • import-no-seeks
  • issue-119
  • issue-138
  • issue-139
  • issue158
  • issue213
  • issue214
  • issue216
  • issue263
  • issue266
  • issue268
  • issue282
  • issue290
  • issue78
  • jam-pickle-prot
  • jam-zodbshootout-26
  • jamadden-patch-1
  • master
  • merge-zodbdocs
  • no-sphinx-on-3.3
  • only-new-style
  • perrinjerome/fix/restore_wrong_prev_txn
  • perrinjerome/repozo-ignored-warning
  • perrinjerome/repozo-recover-stdout
  • prep-5.5.0-release
  • prep-5.5.1-release
  • pure-python-tests
  • pypi
  • python3-compatible-persistent-refs
  • python311
  • python36
  • racetest
  • remove-obsolete
  • repozo-better-error
  • repozo-incremental-recover
  • repozo-verify-exit-code
  • rotonen-bump-pypy
  • storage-afterCompletion
  • storage-afterCompletion2
  • storage-byte-appreciation
  • sunew-failing-test-for-208
  • tour
  • transaction30
  • tseaver-drop_setup_py_test_fossils
  • update-zodbpickle
  • weakset
  • y/check_race-spec
  • y/flakes
  • y/fs1-recover-seek-fix
  • y/goodbye-warnhook
  • y/kill-positive_id
  • y/zope-testrunner-a1000
  • z-object-database
  • zope-interface-fix-inconsistent-iro

pending completion
935

Pull #207

travis-ci

web-flow
Make TransactionMetaData in charge of (de)serializing extension data

IStorage implementations used to do this task themselves which leads to code
duplication and sometimes bugs (one was fixed recently in NEO). Like for object
serialization, this should be done by the upper layer (Connection).

This commit also provides a way to get raw extensions data while iterating
over transactions (this is actually the original purpose[2]). So far, extension
data could only be retrieved unpickled, which caused several problems:

- tools like `zodb dump` [1] cannot dump data exactly as stored on a
  storage. This makes database potentially not bit-to-bit identical to
  its original after restoring from such dump.

- `zodb dump` output could be changing from run to run on the same
  database. This comes from the fact that e.g. python dictionaries are
  unordered and so when pickling a dict back to bytes the result could
  be not the same as original.

  ( this problem can be worked-around partly to work reliably for e.g.
    dict with str keys - by always emitting items in key sorted order,
    but it is hard to make it work reliably for arbitrary types )

Both issues make it hard to verify integrity of database at the lowest
possible level after restoration, and make it hard to verify bit-to-bit
compatibility with non-python ZODB implementations.

For this, TransactionMetaData gets a new 'extension_bytes' attribute and
and common usage becomes:

* Application committing a transaction:

  - 'extension' is set with a dictionary
  - the storage gets the bytes via 'extension_bytes'

* Iteration:

  - the storage passes bytes as 'extension' parameter of TransactionMetaData
  - the application can get extension data either as bytes ('extension_bytes')
    or deserialized ('extension'): in the former case, no deserialization
    happens and the returned value is exactly what was passed by the storage

[1] https://lab.nexedi.com/nexedi/zodbtools
[2] https://github.com/zop... (continued)
Pull Request #207: Make TransactionMetaData in charge of (de)serializing extension data

22 of 22 new or added lines in 4 files covered. (100.0%)

19461 of 25707 relevant lines covered (75.7%)

3.01 hits per line

Relevant lines Covered
Build:
Build:
25707 RELEVANT LINES 19461 COVERED LINES
3.01 HITS PER LINE
Source Files on extension_bytes
  • List 0
  • Changed 33
  • Source Changed 24
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
935 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... Pull #207 23 Sep 2019 12:31PM UTC web-flow travis-ci pending completion  
934 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... push 23 Sep 2019 12:28PM UTC jmuchemb travis-ci pending completion  
933 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... Pull #207 23 Sep 2019 10:53AM UTC web-flow travis-ci pending completion  
932 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... push 23 Sep 2019 10:49AM UTC jmuchemb travis-ci pending completion  
915 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... Pull #207 29 Aug 2019 10:17AM UTC web-flow travis-ci pending completion  
914 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... push 29 Aug 2019 10:13AM UTC jmuchemb travis-ci pending completion  
913 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... Pull #207 29 Aug 2019 09:49AM UTC web-flow travis-ci pending completion  
912 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... push 29 Aug 2019 09:46AM UTC jmuchemb travis-ci pending completion  
852 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... Pull #207 03 Sep 2018 07:11PM UTC web-flow travis-ci pending completion  
851 extension_bytes Make TransactionMetaData in charge of (de)serializing extension data IStorage implementations used to do this task themselves which leads to code duplication and sometimes bugs (one was fixed recently in NEO). Like for object serialization, this ... push 03 Sep 2018 07:06PM UTC jmuchemb travis-ci pending completion  
See All Builds (863)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc