Skip to content

Commit

Permalink
[OCC] fix undesired colon causing re-executions (#466)
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 committed Mar 19, 2024
1 parent edf3698 commit c8a64b5
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 @@ -319,7 +319,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 @@ -332,6 +333,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 @@ -90,6 +91,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 c8a64b5

Please sign in to comment.