Skip to content

Commit 731e6e9

Browse files
fixed a test
1 parent 236221d commit 731e6e9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

posting/mvcc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,16 @@ func (txn *Txn) UpdateCachedKeys(commitTs uint64) {
642642
MemLayerInstance.updateItemInCache(key, delta, txn.StartTs, commitTs)
643643
return nil
644644
})
645+
for _, globalMap := range txn.cache.globalMap {
646+
globalMap.Iterate(func(key string, data *pb.PostingList) error {
647+
dataBytes, err := proto.Marshal(data)
648+
if err != nil {
649+
return err
650+
}
651+
MemLayerInstance.updateItemInCache(key, dataBytes, txn.StartTs, commitTs)
652+
return nil
653+
})
654+
}
645655
}
646656

647657
func unmarshalOrCopy(plist *pb.PostingList, item *badger.Item) error {

0 commit comments

Comments
 (0)