@@ -945,7 +945,8 @@ func (db *DB) doWrites(lc *z.Closer) {
945945
946946// batchSet applies a list of badger.Entry. If a request level error occurs it
947947// will be returned.
948- // Check(kv.BatchSet(entries))
948+ //
949+ // Check(kv.BatchSet(entries))
949950func (db * DB ) batchSet (entries []* Entry ) error {
950951 req , err := db .sendToWriteCh (entries )
951952 if err != nil {
@@ -958,9 +959,10 @@ func (db *DB) batchSet(entries []*Entry) error {
958959// batchSetAsync is the asynchronous version of batchSet. It accepts a callback
959960// function which is called when all the sets are complete. If a request level
960961// error occurs, it will be passed back via the callback.
961- // err := kv.BatchSetAsync(entries, func(err error)) {
962- // Check(err)
963- // }
962+ //
963+ // err := kv.BatchSetAsync(entries, func(err error)) {
964+ // Check(err)
965+ // }
964966func (db * DB ) batchSetAsync (entries []* Entry , f func (error )) error {
965967 req , err := db .sendToWriteCh (entries )
966968 if err != nil {
@@ -1719,16 +1721,16 @@ func (db *DB) dropAll() (func(), error) {
17191721}
17201722
17211723// DropPrefix would drop all the keys with the provided prefix. It does this in the following way:
1722- // - Stop accepting new writes.
1723- // - Stop memtable flushes before acquiring lock. Because we're acquring lock here
1724- // and memtable flush stalls for lock, which leads to deadlock
1725- // - Flush out all memtables, skipping over keys with the given prefix, Kp.
1726- // - Write out the value log header to memtables when flushing, so we don't accidentally bring Kp
1727- // back after a restart.
1728- // - Stop compaction.
1729- // - Compact L0->L1, skipping over Kp.
1730- // - Compact rest of the levels, Li->Li, picking tables which have Kp.
1731- // - Resume memtable flushes, compactions and writes.
1724+ // - Stop accepting new writes.
1725+ // - Stop memtable flushes before acquiring lock. Because we're acquring lock here
1726+ // and memtable flush stalls for lock, which leads to deadlock
1727+ // - Flush out all memtables, skipping over keys with the given prefix, Kp.
1728+ // - Write out the value log header to memtables when flushing, so we don't accidentally bring Kp
1729+ // back after a restart.
1730+ // - Stop compaction.
1731+ // - Compact L0->L1, skipping over Kp.
1732+ // - Compact rest of the levels, Li->Li, picking tables which have Kp.
1733+ // - Resume memtable flushes, compactions and writes.
17321734func (db * DB ) DropPrefix (prefixes ... []byte ) error {
17331735 if len (prefixes ) == 0 {
17341736 return nil
0 commit comments