Page MenuHomeSoftware Heritage

Use the db_transaction decorator on all _add() methods.
ClosedPublic

Authored by vlorentz on Apr 9 2019, 4:41 PM.

Details

Summary

So they gracefully release the connection on error instead
of relying on reference-counting to call the Db's __del__
(which does not happen in Hypothesis tests) because a ref
to it is kept via the traceback object.

Depends on D1380.

Diff Detail

Repository
rDSTO Storage manager
Branch
db_transaction
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5272
Build 7141: tox-on-jenkinsJenkins
Build 7140: arc lint + arc unit

Event Timeline

ardumont added a subscriber: ardumont.

Consistency love!

This revision is now accepted and ready to land.Apr 9 2019, 5:43 PM
olasd added a subscriber: olasd.

LGTM, thanks!

swh/storage/storage.py
839–842

Unnecessary listification here

845–846

Bad @vlorentz trying to introduce a DoS in prod.

This revision was automatically updated to reflect the committed changes.