1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-11 05:52:53 +02:00

Merge branch 'master' into mq-subscribe

This commit is contained in:
chrislu 2024-03-27 23:57:00 -07:00
commit 13b7c7b366
4 changed files with 5 additions and 5 deletions

View file

@ -82,7 +82,7 @@ func (store *MysqlStore2) initialize(createTable, upsertQuery string, enableUpse
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second)
if err = store.DB.Ping(); err != nil { 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") { if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil && !strings.Contains(err.Error(), "table already exist") {

View file

@ -92,7 +92,7 @@ func (store *PostgresStore) initialize(upsertQuery string, enableUpsert bool, us
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second)
if err = store.DB.Ping(); err != nil { 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 return nil

View file

@ -97,7 +97,7 @@ func (store *PostgresStore2) initialize(createTable, upsertQuery string, enableU
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second)
if err = store.DB.Ping(); err != nil { 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 { if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil {

View file

@ -146,8 +146,8 @@ func (i *InodeToPath) HasPath(path util.FullPath) bool {
} }
func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) { func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) {
i.RLock() i.Lock()
defer i.RUnlock() defer i.Unlock()
inode, found := i.path2inode[fullpath] inode, found := i.path2inode[fullpath]
if !found { if !found {
// https://github.com/seaweedfs/seaweedfs/issues/4968 // https://github.com/seaweedfs/seaweedfs/issues/4968