mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
e3: exec retry once (#6943)
This commit is contained in:
parent
58236d62bb
commit
c534453654
@ -744,23 +744,30 @@ func blockWithSenders(db kv.RoDB, tx kv.Tx, blockReader services.BlockReader, bl
|
||||
|
||||
func processResultQueue(rws *exec22.TxTaskQueue, outputTxNum *atomic2.Uint64, rs *state.StateV3, agg *state2.AggregatorV3, applyTx kv.Tx, triggerCount, outputBlockNum, repeatCount *atomic2.Uint64, resultsSize *atomic2.Int64, onSuccess func(), applyWorker *exec3.Worker) error {
|
||||
var txTask *exec22.TxTask
|
||||
var i int
|
||||
for rws.Len() > 0 && (*rws)[0].TxNum == outputTxNum.Load() {
|
||||
txTask = heap.Pop(rws).(*exec22.TxTask)
|
||||
resultsSize.Add(-txTask.ResultsSize)
|
||||
if txTask.Error != nil || !rs.ReadsValid(txTask.ReadLists) {
|
||||
repeatCount.Inc()
|
||||
|
||||
//send to re-exex
|
||||
//rs.AddWork(txTask)
|
||||
//repeatCount.Inc()
|
||||
//continue
|
||||
|
||||
// immediately retry once
|
||||
applyWorker.RunTxTask(txTask)
|
||||
if txTask.Error != nil {
|
||||
return txTask.Error
|
||||
//log.Info("second fail", "blk", txTask.BlockNum, "txn", txTask.BlockNum)
|
||||
//rs.AddWork(txTask)
|
||||
//continue
|
||||
if i == 0 {
|
||||
// re-exec right here: conflict-free
|
||||
applyWorker.RunTxTask(txTask)
|
||||
if txTask.Error != nil {
|
||||
return txTask.Error
|
||||
//log.Info("second fail", "blk", txTask.BlockNum, "txn", txTask.BlockNum)
|
||||
//rs.AddWork(txTask)
|
||||
//continue
|
||||
}
|
||||
i++
|
||||
} else {
|
||||
rs.AddWork(txTask)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user