aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-03-27 23:57:00 -0700
committerchrislu <chris.lu@gmail.com>2024-03-27 23:57:00 -0700
commit13b7c7b366aeec366f887ceb64404741c1329707 (patch)
tree3e2cceef9a1f710fb7a532b47aea3185d8ca0dd4
parente3c8be7f899be52c8fa9bcff35c886d69e2ca693 (diff)
parent6aa804b368242f853b5258f20178eae8a5eda26f (diff)
downloadseaweedfs-13b7c7b366aeec366f887ceb64404741c1329707.tar.xz
seaweedfs-13b7c7b366aeec366f887ceb64404741c1329707.zip
Merge branch 'master' into mq-subscribe
-rw-r--r--weed/filer/mysql2/mysql2_store.go2
-rw-r--r--weed/filer/postgres/postgres_store.go2
-rw-r--r--weed/filer/postgres2/postgres2_store.go2
-rw-r--r--weed/mount/inode_to_path.go4
4 files changed, 5 insertions, 5 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 {
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go
index 8c29ae085..2c0b7203e 100644
--- a/weed/mount/inode_to_path.go
+++ b/weed/mount/inode_to_path.go
@@ -146,8 +146,8 @@ func (i *InodeToPath) HasPath(path util.FullPath) bool {
}
func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) {
- i.RLock()
- defer i.RUnlock()
+ i.Lock()
+ defer i.Unlock()
inode, found := i.path2inode[fullpath]
if !found {
// https://github.com/seaweedfs/seaweedfs/issues/4968