Detach database management from partition manager
For #6101 (closed)
In Gitaly, the partition manager (a part of WAL) manages a key-value
database. This database is backed by badger
. When the partition
manager starts, it initializes the database for each storage. It also
starts garbage collection goroutine. A database is closed when its
counterpart storage finishes.
In the future, when we integrate Raft into Gitaly, it will properly need
access to the underlying key-value database. This MR detaches
the database management out of partition to the existing keyvalue
package. The new manager initializes, starts GC goroutines, and provides
access to the ready databases.
Edited by Quang-Minh Nguyen