mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 03:17:50 +00:00
don't apply startup shard cache to roaring with a specified view path
- avoids creating a new empty 8 byte shard file under all the views that don't have them already.
This commit is contained in:
parent
ed6f59a827
commit
f8e7b27a6f
2 changed files with 17 additions and 0 deletions
15
dbshard.go
15
dbshard.go
|
|
@ -698,6 +698,21 @@ func (per *DBPerShard) TypedDBPerShardGetShardsForIndex(ty txtype, idx *Index, r
|
|||
per.Mu.Lock()
|
||||
defer per.Mu.Unlock()
|
||||
|
||||
if ty == roaringTxn && roaringViewPath != "" {
|
||||
rx := &RoaringTx{
|
||||
Index: idx,
|
||||
}
|
||||
sos, err := rx.SliceOfShards("", "", "", roaringViewPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
shardMap = make(map[uint64]bool)
|
||||
for _, shard := range sos {
|
||||
shardMap[shard] = true
|
||||
}
|
||||
return shardMap, nil
|
||||
}
|
||||
|
||||
i2ss, ok := per.index2shards[ty]
|
||||
if !ok {
|
||||
// index -> shardSet
|
||||
|
|
|
|||
|
|
@ -1307,6 +1307,8 @@ func (f *TxFactory) green2blue(holder *Holder) (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
holder.Logger.Printf("green2blue analysis begins.")
|
||||
|
||||
blueDest := f.types[0]
|
||||
greenSrc := f.types[1]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue