]> Sergey Matveev's repositories - public-inbox.git/commit
sharedkv: lock and explicitly disconnect {dbh}
authorEric Wong <e@80x24.org>
Mon, 1 Feb 2021 08:28:24 +0000 (22:28 -1000)
committerEric Wong <e@80x24.org>
Mon, 1 Feb 2021 11:38:17 +0000 (11:38 +0000)
commit2e8256ba1ced49a686bf5ff1c97375f8ccb30d4a
tree367f885570f711af15b59f324f553f546249ccff
parent7d3917a9722e445ecb040c2c01e9665123ad5b6c
sharedkv: lock and explicitly disconnect {dbh}

It may be possible for updates or changes to be uncommitted
until disconnect, so we'll use flock() as we do elsewhere
to avoid the polling retry behavior of SQLite.

We also need to clear CachedKids before disconnecting to
to avoid warnings like:

  ->disconnect invalidates 1 active statement handle
  (either destroy statement handles or call finish on
  them before disconnecting)
lib/PublicInbox/LeiDedupe.pm
lib/PublicInbox/SharedKV.pm