Working with multiple dbs in one process?

(Ivan Shibitov) #1

Might be my question is very strange. But. Is it OK to use multiple dbs in one process? I mean for my application it would be conveniently to create new db every 20 sec and manage some subset of them in parallel.
Or I can meet with some stranges and side affects?
Thank you!

(Ashish) #2

Hey @Ivan ,

Using multiple Badger DBs in a single process, should be fine. Dgraph itself uses 2 instances, but those are for life time.
We are not very sure of what will be the side affects, if you are creating a new instance every 20 sec. But this might result in increase of resource utilisation, as every instance will use some minimal resources.

(Ivan Shibitov) #3

Hey @ashishgoswami,
I found losing goroutines after closing db.
Goroutine in WaterMark.Init():54 never exits.

It waits on
for mark := range w.markCh {