From 77d3a9093671151f118bdd74043d61d5d4f7e6e4 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sun, 9 Oct 2022 18:51:13 +0700 Subject: [PATCH] Revert "save" This reverts commit f24d3231acfb9ec942f0cccc02ea3df5bbeb7bdc. --- state/history.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/state/history.go b/state/history.go index 0d3f873ed..ee254d774 100644 --- a/state/history.go +++ b/state/history.go @@ -27,7 +27,6 @@ import ( "path/filepath" "regexp" "strconv" - "sync" "github.com/RoaringBitmap/roaring/roaring64" "github.com/google/btree" @@ -789,41 +788,6 @@ func (h *History) MakeContext() *HistoryContext { } func (hc *HistoryContext) SetTx(tx kv.Tx) { hc.tx = tx } -func (hc *HistoryContext) IterateAll() { - wg := sync.WaitGroup{} - hc.indexFiles.Ascend(func(item ctxItem) bool { - //fmt.Printf("ef item %d-%d, key %x\n", item.startTxNum, item.endTxNum, key) - if item.reader.Empty() { - return true - } - wg.Add(1) - go func(item ctxItem) { - defer wg.Done() - defer func() { - rec := recover() - if rec != nil { - a := fmt.Errorf("%v, at %d-%d, %s", rec, item.startTxNum/hc.h.aggregationStep, item.endTxNum/hc.h.aggregationStep, hc.h.filenameBase) - panic(a) - } - }() - - g := item.getter - g.Reset(0) - for g.HasNext() { - k, _ := g.NextUncompressed() - _ = k - eliasVal, _ := g.NextUncompressed() - ef, _ := eliasfano32.ReadEliasFano(eliasVal) - it := ef.Iterator() - for it.HasNext() { - it.Next() - } - } - }(item) - return true - }) - wg.Wait() -} func (hc *HistoryContext) GetNoState(key []byte, txNum uint64) ([]byte, bool, error) { //fmt.Printf("GetNoState [%x] %d\n", key, txNum) var foundTxNum uint64