Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase token data worker settings and cache duration #1583

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core/services/ocr2/plugins/ccip/ccipexec/initializers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ var (
// 5s for token data worker timeout is a reasonable default.
tokenDataWorkerTimeout = 5 * time.Second
// tokenDataWorkerNumWorkers is the number of workers that will be processing token data in parallel.
tokenDataWorkerNumWorkers = 5
tokenDataWorkerNumWorkers = 10
// expirationDur is the duration for which the token data will be cached.
expirationDurTokenData = 10 * time.Minute
)

var defaultNewReportingPluginRetryConfig = ccipdata.RetryConfig{
Expand Down Expand Up @@ -169,7 +171,7 @@ func NewExecServices(ctx context.Context, lggr logger.Logger, jb job.Job, srcPro
tokenDataProviders,
tokenDataWorkerNumWorkers,
tokenDataWorkerTimeout,
2*tokenDataWorkerTimeout,
expirationDurTokenData,
)

wrappedPluginFactory := NewExecutionReportingPluginFactory(ExecutionPluginStaticConfig{
Expand Down
2 changes: 1 addition & 1 deletion core/services/ocr2/plugins/ccip/tokendata/bgworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewBackgroundWorker(
return &BackgroundWorker{
tokenDataReaders: tokenDataReaders,
numWorkers: numWorkers,
jobsChan: make(chan cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta, numWorkers*100),
jobsChan: make(chan cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta, numWorkers*200),
resultsCache: cache.New(expirationDur, expirationDur/2),
timeoutDur: timeoutDur,

Expand Down
Loading