From 9ad11f95549b8600478623776cb824c699159284 Mon Sep 17 00:00:00 2001 From: Steven Landers Date: Tue, 19 Mar 2024 17:36:32 -0400 Subject: [PATCH] [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 --- tasks/scheduler.go | 6 +++++- tasks/scheduler_test.go | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/scheduler.go b/tasks/scheduler.go index 2a40993bc..8b816e0d7 100644 --- a/tasks/scheduler.go +++ b/tasks/scheduler.go @@ -306,7 +306,8 @@ func (s *scheduler) ProcessAll(ctx sdk.Context, reqs []*sdk.DeliverTxEntry) ([]t // validate returns any that should be re-executed // note this processes ALL tasks, not just those recently executed - toExecute, err := s.validateAll(ctx, tasks) + var err error + toExecute, err = s.validateAll(ctx, tasks) if err != nil { return nil, err } @@ -319,6 +320,9 @@ func (s *scheduler) ProcessAll(ctx sdk.Context, reqs []*sdk.DeliverTxEntry) ([]t mv.WriteLatestToStore() } s.metrics.maxIncarnation = s.maxIncarnation + + ctx.Logger().Info("occ scheduler", "height", ctx.BlockHeight(), "txs", len(tasks), "maxIncarnation", s.maxIncarnation, "iterations", iterations, "sync", s.synchronous, "workers", s.workers) + return s.collectResponses(tasks), nil } diff --git a/tasks/scheduler_test.go b/tasks/scheduler_test.go index 94abc0e65..49c6adb51 100644 --- a/tasks/scheduler_test.go +++ b/tasks/scheduler_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/trace" @@ -66,6 +67,7 @@ func initTestCtx(injectStores bool) sdk.Context { } store := cachemulti.NewStore(db, stores, keys, nil, nil, nil) ctx = ctx.WithMultiStore(&store) + ctx = ctx.WithLogger(log.NewNopLogger()) return ctx }