Skip to content

Commit 9ad11f9

Browse files
[OCC] fix undesired colon causing re-executions (#466) (#467)
## Describe your changes and provide context - toExecute is supposed to be overwritten - added summary log line ## Testing performed to validate your change - load tests confirm performance not impacted
1 parent e8a28d3 commit 9ad11f9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: tasks/scheduler.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ func (s *scheduler) ProcessAll(ctx sdk.Context, reqs []*sdk.DeliverTxEntry) ([]t
306306

307307
// validate returns any that should be re-executed
308308
// note this processes ALL tasks, not just those recently executed
309-
toExecute, err := s.validateAll(ctx, tasks)
309+
var err error
310+
toExecute, err = s.validateAll(ctx, tasks)
310311
if err != nil {
311312
return nil, err
312313
}
@@ -319,6 +320,9 @@ func (s *scheduler) ProcessAll(ctx sdk.Context, reqs []*sdk.DeliverTxEntry) ([]t
319320
mv.WriteLatestToStore()
320321
}
321322
s.metrics.maxIncarnation = s.maxIncarnation
323+
324+
ctx.Logger().Info("occ scheduler", "height", ctx.BlockHeight(), "txs", len(tasks), "maxIncarnation", s.maxIncarnation, "iterations", iterations, "sync", s.synchronous, "workers", s.workers)
325+
322326
return s.collectResponses(tasks), nil
323327
}
324328

Diff for: tasks/scheduler_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/stretchr/testify/require"
1515
"github.com/tendermint/tendermint/abci/types"
16+
"github.com/tendermint/tendermint/libs/log"
1617
dbm "github.com/tendermint/tm-db"
1718
"go.opentelemetry.io/otel"
1819
"go.opentelemetry.io/otel/trace"
@@ -66,6 +67,7 @@ func initTestCtx(injectStores bool) sdk.Context {
6667
}
6768
store := cachemulti.NewStore(db, stores, keys, nil, nil, nil)
6869
ctx = ctx.WithMultiStore(&store)
70+
ctx = ctx.WithLogger(log.NewNopLogger())
6971
return ctx
7072
}
7173

0 commit comments

Comments
 (0)