func (db *DB) Close() error {
	db.writeLock.Lock()
	defer db.writeLock.Unlock()

	db.compactor.stop()

	if db.currWriteFile != nil {
		if err := db.currWriteFile.Sync(); err != nil { // file will be closed in closeAllFiles
			db.manifest.IOError = true
		}
	}

	if err := db.closeAllFiles(); err != nil {
		db.manifest.IOError = true
	}

	db.manifest.DBOpen = false
	return db.manifest.Save(db.rootDir)
}
// Close closed the current instance of the db. Any subsequent map operation will no more be synched on disk
Close closed the current instance of the db. Any subsequent map operation will no more be synched on disk
// Close closed the current instance of the db . Any subsequent map operation will no more be synched on disk
func (db *DB) Close() error {
	db.writeLock.Lock()
	defer db.writeLock.Unlock()
	db.compactor.stop()
	if db.currWriteFile != nil {
		if err := db.currWriteFile.Sync(); err != nil { 
			db.manifest.IOError = true
		}
	}
	if err := db.closeAllFiles(); err != nil {
		db.manifest.IOError = true
	}
	db.manifest.DBOpen = false
	return db.manifest.Save(db.rootDir)
}
func ( db * DB ) Close ( ) error { db . writeLock . Lock ( ) defer db . writeLock . Unlock ( ) db . compactor . stop ( ) if db . currWriteFile != nil { if err := db . currWriteFile . Sync ( ) ; err != nil { db . manifest . IOError = true } } if err := db . closeAllFiles ( ) ; err != nil { db . manifest . IOError = true } db . manifest . DBOpen = false return db . manifest . Save ( db . rootDir ) }
Close closed the current instance of the db.
Close closed the current instance of the db .
// file will be closed in closeAllFiles