1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-25 20:09:30 +02:00

filer: postgres2 mysql2 avoid repeatedly creating tables

This commit is contained in:
Chris Lu 2021-02-15 16:19:24 -08:00
parent 71f0c19515
commit b9b5b932c5

View file

@ -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
}
}