Skip to content

Commit

Permalink
[OCC] fix undesired colon causing re-executions (#466) (#467)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
stevenlanders authored Mar 19, 2024
1 parent e8a28d3 commit 9ad11f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions tasks/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9ad11f9

Please sign in to comment.