stop compaction after flushing the memtable and don't close the channel while closing the doWrite (#918)
stop compaction after flushing the memtable and don't close the channel while closing the doWrite (#918)

* close channel while closing the db

* stop compaction after flushing the memtable
Signed-off-by: பாலாஜி ஜின்னா <c911b012dda655ef3565615a6bfb80d022001fe8@dgraph.io>

dgraph-io/badger,dgraph-io/badger