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:
Jason E. Aten 2020-10-29 22:09:55 +00:00
parent ed6f59a827
commit f8e7b27a6f
2 changed files with 17 additions and 0 deletions

View file

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

View file

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