Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion erigon-lib/state/inverted_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ func (iit *InvertedIndexRoTx) Prune(ctx context.Context, rwTx kv.RwTx, txFrom, t

collector := etl.NewCollector(ii.filenameBase+".prune.ii", ii.dirs.Tmp, etl.NewSortableBuffer(etl.BufferOptimalSize/8), ii.logger)
defer collector.Close()
collector.LogLvl(log.LvlDebug)
collector.LogLvl(log.LvlTrace)
collector.SortAndFlushInBackground(true)

var txKey [8]byte
Expand Down
16 changes: 11 additions & 5 deletions eth/stagedsync/exec3.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type Progress struct {
logger log.Logger
}

func (p *Progress) Log(rs *state.StateV3, in *state.QueueWithRetry, rws *state.ResultsQueue, doneCount, inputBlockNum, outputBlockNum, outTxNum, repeatCount uint64, idxStepsAmountInDB float64) {
func (p *Progress) Log(rs *state.StateV3, in *state.QueueWithRetry, rws *state.ResultsQueue, doneCount, inputBlockNum, outputBlockNum, outTxNum, repeatCount uint64, idxStepsAmountInDB float64, shouldGenerateChangesets bool) {
execStepsInDB.Set(idxStepsAmountInDB * 100)
var m runtime.MemStats
dbg.ReadMemStats(&m)
Expand All @@ -99,14 +99,19 @@ func (p *Progress) Log(rs *state.StateV3, in *state.QueueWithRetry, rws *state.R
//if doneCount > p.prevCount {
// repeatRatio = 100.0 * float64(repeatCount-p.prevRepeatCount) / float64(doneCount-p.prevCount)
//}
p.logger.Info(fmt.Sprintf("[%s] Transaction replay", p.logPrefix),

var suffix string
if shouldGenerateChangesets {
suffix = " Commit every block"
}
p.logger.Info(fmt.Sprintf("[%s]"+suffix, p.logPrefix),
//"workers", workerCount,
"blk", outputBlockNum,
"tx/s", fmt.Sprintf("%.1f", speedTx),
//"pipe", fmt.Sprintf("(%d+%d)->%d/%d->%d/%d", in.NewTasksLen(), in.RetriesLen(), rws.ResultChLen(), rws.ResultChCap(), rws.Len(), rws.Limit()),
//"repeatRatio", fmt.Sprintf("%.2f%%", repeatRatio),
//"workers", p.workersCount,
"buffer", fmt.Sprintf("%s/%s", common.ByteCount(sizeEstimate), common.ByteCount(p.commitThreshold)),
"buf", fmt.Sprintf("%s/%s", common.ByteCount(sizeEstimate), common.ByteCount(p.commitThreshold)),
"stepsInDB", fmt.Sprintf("%.2f", idxStepsAmountInDB),
"step", fmt.Sprintf("%.1f", float64(outTxNum)/float64(config3.HistoryV3AggregationStep)),
"alloc", common.ByteCount(m.Alloc), "sys", common.ByteCount(m.Sys),
Expand Down Expand Up @@ -440,7 +445,8 @@ func ExecV3(ctx context.Context,

case <-logEvery.C:
stepsInDB := rawdbhelpers.IdxStepsCountV3(tx)
progress.Log(rs, in, rws, rs.DoneCount(), inputBlockNum.Load(), outputBlockNum.GetValueUint64(), outputTxNum.Load(), execRepeats.GetValueUint64(), stepsInDB)

progress.Log(rs, in, rws, rs.DoneCount(), inputBlockNum.Load(), outputBlockNum.GetValueUint64(), outputTxNum.Load(), execRepeats.GetValueUint64(), stepsInDB, shouldGenerateChangesets)
if agg.HasBackgroundFilesBuild() {
logger.Info(fmt.Sprintf("[%s] Background files build", execStage.LogPrefix()), "progress", agg.BackgroundProgress())
}
Expand Down Expand Up @@ -876,7 +882,7 @@ Loop:
select {
case <-logEvery.C:
stepsInDB := rawdbhelpers.IdxStepsCountV3(applyTx)
progress.Log(rs, in, rws, count, inputBlockNum.Load(), outputBlockNum.GetValueUint64(), outputTxNum.Load(), execRepeats.GetValueUint64(), stepsInDB)
progress.Log(rs, in, rws, count, inputBlockNum.Load(), outputBlockNum.GetValueUint64(), outputTxNum.Load(), execRepeats.GetValueUint64(), stepsInDB, shouldGenerateChangesets)
//if applyTx.(state2.HasAggTx).AggTx().(*state2.AggregatorRoTx).CanPrune(applyTx, outputTxNum.Load()) {
// //small prune cause MDBX_TXN_FULL
// if _, err := applyTx.(state2.HasAggTx).AggTx().(*state2.AggregatorRoTx).PruneSmallBatches(ctx, 10*time.Hour, applyTx); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion p2p/sentry/sentry_grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (pi *PeerInfo) Async(f func(), logger log.Logger) {
default:
}
}
logger.Debug("slow peer or too many requests, dropping its old requests", "name", pi.peer.Name())
logger.Trace("[sentry] slow peer or too many requests, dropping its old requests", "name", pi.peer.Name())
}
}
}
Expand Down