solus-project / ferryd

Fast, safe and reliable transit for the delivery of software updates to users.

Home Page:https://solus-project.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework libdb to return Connection handle

ikeydoherty opened this issue · comments

We should have a simple system in place that returns a connection handle for a given duration (i.e. batched functions) and is then later closed. When the last connection is closed, set the connection count to 0, and after some timeout, close the underlying database connection again. This will help to ensure that leveldb memory is reclaimed and ensure recovery, etc, all work properly.

Without this, our memory usage is going to keep growing unbounded.