Since metadata and history already share the same database, it makes
sense to share the connection as well, to prevent unnecessary locking on
the db file.
Related to T2830.
Differential D4801
FUSE: cache: share sqlite connection between metadata/history cache haltode on Jan 4 2021, 10:24 AM. Authored by
Details
Since metadata and history already share the same database, it makes Related to T2830.
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D4801 (id=16990)Rebasing onto 3a76424ac8... Current branch diff-target is up to date. Changes applied before testcommit 32223da19ca87999645bba6905c9ed86eda3a0d6 Author: Thibault Allançon <haltode@gmail.com> Date: Mon Jan 4 10:20:06 2021 +0100 cache: share sqlite connection between metadata/history cache Since metadata and history already share the same database, it makes sense to share the connection as well, to prevent unnecessary locking on the db file. Related to T2830. See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/255/ for more details. Comment Actions I don't like this "asymmetric" approach much. I'd rather have both caches being equal and taking as class constructor input an optional sqlite connection. If it's None, they'll each create a connection (and not share it). If a connection is passed, they use it and do not close it on exit. Then, the init code in FuseCache takes care of initializing the shared sqlite connection, and passing it to both constructors. This will make the classes more reusable and the init code more clean. Comment Actions Build is green Patch application report for D4801 (id=17024)Rebasing onto 3a76424ac8... Current branch diff-target is up to date. Changes applied before testcommit e2c04fc05f590c68e579ae6809ecf5d7140b6f1b Author: Thibault Allançon <haltode@gmail.com> Date: Mon Jan 4 10:20:06 2021 +0100 cache: share sqlite connection between metadata/history cache Since metadata and history already share the same database, it makes sense to share the connection as well, to prevent unnecessary locking on the db file. Related to T2830. See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/256/ for more details. Comment Actions Build is green Patch application report for D4801 (id=17025)Rebasing onto 3a76424ac8... Current branch diff-target is up to date. Changes applied before testcommit 75249aea1698d38d5543e5d814cd1785c0abe567 Author: Thibault Allançon <haltode@gmail.com> Date: Mon Jan 4 10:20:06 2021 +0100 cache: share sqlite connection between metadata/history cache Since metadata and history already share the same database, it makes sense to share the connection as well, to prevent unnecessary locking on the db file. Related to T2830. See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/257/ for more details. Comment Actions Build is green Patch application report for D4801 (id=17026)Rebasing onto 3a76424ac8... Current branch diff-target is up to date. Changes applied before testcommit b59cf2a1d12c607573313c41a798da5658250e8c Author: Thibault Allançon <haltode@gmail.com> Date: Mon Jan 4 10:20:06 2021 +0100 cache: share sqlite connection between metadata/history cache Since metadata and history already share the same database, it makes sense to share the connection as well, to prevent unnecessary locking on the db file. Related to T2830. See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/258/ for more details. |