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

Add overall limit on sampled upkeeps #264

Merged
merged 2 commits into from
Sep 6, 2023
Merged

Conversation

infiloop2
Copy link
Collaborator

@infiloop2 infiloop2 commented Sep 5, 2023

in smartcontractkit/chainlink#10485 we are putting overall limits on logs surfaced on every tick. Also putting a limit on conditionals samples done in a tick. We already have a random order defined on upkeeps, just put a limit on the total upkeeps we select

If number of required samples go above this, we should ideally log an error (not able to do right now with current logger). But the behaviour would be that the upkeeps would be bit delayed in getting sampled, rather than bombarding runner with a lot of checks which would affect log triggers too

@infiloop2 infiloop2 changed the title Add overall limit on sampled upkeeps to release pressure on runner Add overall limit on sampled upkeeps Sep 5, 2023
@infiloop2 infiloop2 requested review from amirylm and ferglor September 5, 2023 18:32
@infiloop2 infiloop2 marked this pull request as ready for review September 5, 2023 18:32
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition 33.3% 33.3% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@@ -19,6 +19,8 @@ import (
const (
// This is the ticker interval for sampling conditional flow
SamplingConditionInterval = 3 * time.Second
// Maximum number of upkeeps to be sampled in every round
MaxSampledConditionals = 300
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't used outside this package I would lower case it so that it's not exported

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, but currently i would prefer to keep it consistent with other consts in package (which are also used just within the package but capitalised)

@infiloop2 infiloop2 merged commit 71c9c91 into main Sep 6, 2023
@infiloop2 infiloop2 deleted the add-overall-limit-conditionals branch September 6, 2023 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants