From 36fec34c472266fe2a8f087af7de3945dc198726 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 25 Mar 2024 12:50:43 -0700 Subject: [PATCH] print only adapted url fix https://github.com/seaweedfs/seaweedfs/issues/5424 --- weed/filer/mysql2/mysql2_store.go | 2 +- weed/filer/postgres/postgres_store.go | 2 +- weed/filer/postgres2/postgres2_store.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/filer/mysql2/mysql2_store.go b/weed/filer/mysql2/mysql2_store.go index acf621a00..2bce3c063 100644 --- a/weed/filer/mysql2/mysql2_store.go +++ b/weed/filer/mysql2/mysql2_store.go @@ -82,7 +82,7 @@ func (store *MysqlStore2) initialize(createTable, upsertQuery string, enableUpse store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) if err = store.DB.Ping(); err != nil { - return fmt.Errorf("connect to %s error:%v", sqlUrl, err) + return fmt.Errorf("connect to %s error:%v", adaptedSqlUrl, err) } if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil && !strings.Contains(err.Error(), "table already exist") { diff --git a/weed/filer/postgres/postgres_store.go b/weed/filer/postgres/postgres_store.go index cacdbd864..0c02f0726 100644 --- a/weed/filer/postgres/postgres_store.go +++ b/weed/filer/postgres/postgres_store.go @@ -92,7 +92,7 @@ func (store *PostgresStore) initialize(upsertQuery string, enableUpsert bool, us store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) if err = store.DB.Ping(); err != nil { - return fmt.Errorf("connect to %s error:%v", sqlUrl, err) + return fmt.Errorf("connect to %s error:%v", adaptedSqlUrl, err) } return nil diff --git a/weed/filer/postgres2/postgres2_store.go b/weed/filer/postgres2/postgres2_store.go index bdff859e9..4f063ad19 100644 --- a/weed/filer/postgres2/postgres2_store.go +++ b/weed/filer/postgres2/postgres2_store.go @@ -97,7 +97,7 @@ func (store *PostgresStore2) initialize(createTable, upsertQuery string, enableU store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) if err = store.DB.Ping(); err != nil { - return fmt.Errorf("connect to %s error:%v", sqlUrl, err) + return fmt.Errorf("connect to %s error:%v", adaptedSqlUrl, err) } if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil {