mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Merge pull request #966 from molecula/fix843
pilosa/dbshard: allow deleteIndex and then re-use of index
This commit is contained in:
commit
db9e8cd8ef
1 changed files with 4 additions and 1 deletions
|
|
@ -320,6 +320,9 @@ func (per *DBPerShard) DeleteIndex(index string) (err error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// allow the index to be created again anew.
|
||||
delete(per.dbh.Index, index)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -436,7 +439,7 @@ func (per *DBPerShard) GetDBShard(index string, shard uint64, idx *Index) (dbs *
|
|||
if len(per.types) == 1 && per.types[0] == roaringTxn {
|
||||
// roaring txn are nil/fake anyway. Don't freak out.
|
||||
} else {
|
||||
panic(fmt.Sprintf("cannot retain closed dbs across holder ReOpen dbs='%p'", dbs))
|
||||
panic(fmt.Sprintf("cannot retain closed dbs across holder ReOpen dbs='%p'; per.types[0]='%v'; len(per.types)=%v", dbs, per.types[0], len(per.types)))
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue