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.
See also: D1381
Paths
| Differential D1384 Authored by vlorentz on Apr 9 2019, 4:56 PM.
Details
Summary So they gracefully release the connection on error instead See also: D1381
Diff Detail
Event TimelineHerald added a reviewer: Reviewers. · View Herald TranscriptApr 9 2019, 4:56 PM2019-04-09 16:56:02 (UTC+2) Comment Actions Build is green Harbormaster completed remote builds in B5246: Diff 4438.Apr 9 2019, 4:58 PM2019-04-09 16:58:42 (UTC+2) This revision is now accepted and ready to land.Apr 9 2019, 5:33 PM2019-04-09 17:33:54 (UTC+2)
Closed by commit rDCORE1d9c0bf05c32: Explicitely give Db connections back to the pool. (authored by vlorentz). · Explain WhyApr 9 2019, 6:05 PM2019-04-09 18:05:09 (UTC+2) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 4478 swh/core/db/__init__.py
swh/core/db/common.py
|
Can we guard this with an if hasattr(self, 'put_db') to avoid making other users of this (indexer, archiver) insta-buggy?