Merge branch 'master' into fix-translate_index_keys

This commit is contained in:
Kuba Podgórski 2020-09-16 10:39:32 +02:00 committed by GitHub
commit ab26134992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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