mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
Merge pull request #848 from molecula/fix_843
don't panic if dbs is reopened under roaring only. fixes #843
This commit is contained in:
commit
793cf934b8
1 changed files with 5 additions and 1 deletions
|
|
@ -405,7 +405,11 @@ func (per *DBPerShard) GetDBShard(index string, shard uint64, idx *Index) (dbs *
|
|||
}
|
||||
dbs, ok = dbi.Shard[shard]
|
||||
if dbs != nil && dbs.closed {
|
||||
panic(fmt.Sprintf("cannot retain closed dbs across holder ReOpen dbs='%p'", 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))
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
dbs = &DBShard{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue