Browse Source

filer: postgres2 mysql2 avoid repeatedly creating tables

pull/1811/head
Chris Lu 4 years ago
parent
commit
b9b5b932c5
  1. 2
      weed/filer/abstract_sql/abstract_sql_store.go

2
weed/filer/abstract_sql/abstract_sql_store.go

@ -107,7 +107,7 @@ func (store *AbstractSqlStore) getTxOrDB(ctx context.Context, fullpath util.Full
}
if _, found := store.dbs[bucket]; !found {
if err = store.CreateTable(ctx, bucket); err != nil {
if err = store.CreateTable(ctx, bucket); err == nil {
store.dbs[bucket] = true
}
}

Loading…
Cancel
Save