SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
fix error handling
chrisludff85e9c71ef
diff --git a/weed/filer/sqlite/sqlite_store.go b/weed/filer/sqlite/sqlite_store.goindex 2bacf051aa..202834fa25 100644--- a/weed/filer/sqlite/sqlite_store.go+++ b/weed/filer/sqlite/sqlite_store.go@@ -63,9 +63,11 @@ func (store *SqliteStore) initialize(dbFile, createTable, upsertQuery string) (evar dbErr errorstore.DB, dbErr = sql.Open("sqlite", dbFile)if dbErr != nil {- store.DB.Close()- store.DB = nil- return fmt.Errorf("can not connect to %s error:%v", dbFile, err)+ if store.DB != nil {+ store.DB.Close()+ store.DB = nil+ }+ return fmt.Errorf("can not connect to %s error:%v", dbFile, dbErr)}if err = store.DB.Ping(); err != nil {