how to avoid get ErrBlockedWrites when call DB.DropPrefix and DB.Update on two threads?
I have use a sync.Mutex to avoid this problem,Is there any other good way to solve this problem?
sync.RWMutex? RLock to DB.Update , Lock to DB.DropPrefix?
retry in DB.Update?
How to avoid close of closed channel when DB.Flatten called in two threads?
panic: close of closed channel
goroutine 31 [running]:
github.com/dgraph-io/badger.(*DB).Flatten(0xc0000a6d80, 0x2, 0x0, 0x0)