Browse Source

Merge branch 'master' into mq-subscribe

mq-subscribe
chrislu 9 months ago
parent
commit
13b7c7b366
  1. 2
      weed/filer/mysql2/mysql2_store.go
  2. 2
      weed/filer/postgres/postgres_store.go
  3. 2
      weed/filer/postgres2/postgres2_store.go
  4. 4
      weed/mount/inode_to_path.go

2
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") {

2
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

2
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 {

4
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

Loading…
Cancel
Save