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(filer): don't disable the SQL idle connection pool when unconfigured (#9591)
Chris Lua17dca70095f
diff --git a/weed/filer/mysql/mysql_store.go b/weed/filer/mysql/mysql_store.goindex cb96dea1d9..2e83e7a4df 100644--- a/weed/filer/mysql/mysql_store.go+++ b/weed/filer/mysql/mysql_store.go@@ -33,6 +33,8 @@ func (store *MysqlStore) GetName() string {}func (store *MysqlStore) Initialize(configuration util.Configuration, prefix string) (err error) {+ // Absent key keeps a pooled default; an explicit 0 disables the idle pool.+ configuration.SetDefault(prefix+"connection_max_idle", 2)return store.initialize(configuration.GetString(prefix+"dsn"),configuration.GetString(prefix+"upsertQuery"),diff --git a/weed/filer/mysql2/mysql2_store.go b/weed/filer/mysql2/mysql2_store.goindex 2bce3c0633..82d0c86c28 100644--- a/weed/filer/mysql2/mysql2_store.go+++ b/weed/filer/mysql2/mysql2_store.go@@ -33,6 +33,8 @@ func (store *MysqlStore2) GetName() string {}func (store *MysqlStore2) Initialize(configuration util.Configuration, prefix string) (err error) {+ // Absent key keeps a pooled default; an explicit 0 disables the idle pool.+ configuration.SetDefault(prefix+"connection_max_idle", 2)return store.initialize(configuration.GetString(prefix+"createTable"),configuration.GetString(prefix+"upsertQuery"),diff --git a/weed/filer/postgres/postgres_store.go b/weed/filer/postgres/postgres_store.goindex 6778bc59e6..fa6cb7df6f 100644--- a/weed/filer/postgres/postgres_store.go+++ b/weed/filer/postgres/postgres_store.go@@ -28,6 +28,8 @@ func (store *PostgresStore) GetName() string {}func (store *PostgresStore) Initialize(configuration util.Configuration, prefix string) (err error) {+ // Absent key keeps a pooled default; an explicit 0 disables the idle pool.+ configuration.SetDefault(prefix+"connection_max_idle", 2)return store.initialize(configuration.GetString(prefix+"upsertQuery"),configuration.GetBool(prefix+"enableUpsert"),diff --git a/weed/filer/postgres2/postgres2_store.go b/weed/filer/postgres2/postgres2_store.goindex d563ec3226..64e86b9dad 100644--- a/weed/filer/postgres2/postgres2_store.go+++ b/weed/filer/postgres2/postgres2_store.go@@ -33,6 +33,8 @@ func (store *PostgresStore2) GetName() string {}func (store *PostgresStore2) Initialize(configuration util.Configuration, prefix string) (err error) {+ // Absent key keeps a pooled default; an explicit 0 disables the idle pool.+ configuration.SetDefault(prefix+"connection_max_idle", 2)return store.initialize(configuration.GetString(prefix+"createTable"),configuration.GetString(prefix+"upsertQuery"),