This commit is contained in:
alex.sharov 2023-04-19 14:23:29 +07:00
parent f3e50fc91a
commit 9b0d9700dd
3 changed files with 0 additions and 35 deletions

View File

@ -3,8 +3,6 @@ package exec22
import (
"container/heap"
"context"
"fmt"
"strings"
"sync"
"github.com/holiman/uint256"
@ -13,7 +11,6 @@ import (
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/core/types/accounts"
"github.com/ledgerwatch/erigon/core/vm/evmtypes"
"github.com/ledgerwatch/log/v3"
)
// ReadWriteSet contains ReadSet, WriteSet and BalanceIncrease of a transaction,
@ -181,7 +178,6 @@ func (q *QueueWithRetry) popWait(ctx context.Context) (task *TxTask, ok bool) {
case inTask, ok := <-q.newTasks:
if !ok {
q.retiresLock.Lock()
log.Warn("[dbg] Next: see closed chan, read task from queue", "q.retires.Len()", q.retires.Len())
if q.retires.Len() > 0 {
task = heap.Pop(&q.retires).(*TxTask)
}
@ -324,26 +320,6 @@ func (q *ResultsQueueIter) PopNext() *TxTask {
}
func (q *ResultsQueue) Drain(ctx context.Context) error {
//q.Lock()
//l := q.results.Len()
//q.Unlock()
//if queue is empty, then need block to wait new results
//if l > 0 {
// q.drainNoBlock(nil)
// return nil
//}
q.Lock()
msg := []string{}
for _, t := range *(q.results) {
if t.TxNum > 9300_000 {
msg = append(msg, fmt.Sprintf("%d", t.TxNum))
}
}
if len(msg) > 0 {
log.Warn("[dbg] before drain resultqueue", "txnum", strings.Join(msg, ","))
}
q.Unlock()
select {
case <-ctx.Done():
return ctx.Err()

View File

@ -104,9 +104,6 @@ func (rw *Worker) Run() error {
if err := rw.resultCh.Add(rw.ctx, txTask); err != nil {
return err
}
//if txTask.TxNum > 930_000 {
//log.Warn("[dbg] before next", "newTasks", rw.in.NewTasksLen(), "retires", rw.in.RetriesLen())
//}
}
return nil
}

View File

@ -229,10 +229,6 @@ func ExecV3(ctx context.Context,
var lastBlockNum uint64
for outputTxNum.Load() <= maxTxNum {
if outputTxNum.Load() > 9300_000 {
log.Warn("[dbg] before drain", "outputTxNum.Load()", outputTxNum.Load(), "maxTxNum", maxTxNum, "rws.ResultChLen()", rws.ResultChLen(), "rws.Len", rws.Len())
}
if err := rws.Drain(ctx); err != nil {
return err
}
@ -300,10 +296,6 @@ func ExecV3(ctx context.Context,
case <-logEvery.C:
stepsInDB := rawdbhelpers.IdxStepsCountV3(tx)
l := in.RetryTxNumsList()
if len(l) > 0 {
log.Warn("[dbg] stat of in-queue", "newTasks", in.NewTasksLen(), "retires", in.RetriesLen(), "txNums", fmt.Sprintf("%d", l), "outputTxNum.Load()", outputTxNum.Load())
}
progress.Log(rs, in, rws, rs.DoneCount(), inputBlockNum.Load(), outputBlockNum.Get(), outputTxNum.Load(), ExecRepeats.Get(), stepsInDB)
if agg.HasBackgroundFilesBuild() {
log.Info(fmt.Sprintf("[%s] Background files build", logPrefix), "progress", agg.BackgroundProgress())