-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Track when we enqueue logs for the same upkeep on the same block more than once #13176
Conversation
if lastBlockSeen := b.lastBlockSeen.Load(); lastBlockSeen < latestLogBlock { | ||
b.lastBlockSeen.Store(latestLogBlock) | ||
} else if latestLogBlock < lastBlockSeen { | ||
b.lggr.Debugw("enqueuing logs from a block older than latest seen block", "logBlock", latestLogBlock, "lastBlockSeen", lastBlockSeen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. enqueuing logs with a latest block older older than latest seen block
42f70dc
to
85dfa11
Compare
85dfa11
to
5980d0d
Compare
Quality Gate passedIssues Measures |
…olated Add tests Add changeset
5980d0d
to
449c76f
Compare
if uid == nil { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious did we run into this issue? do we have codepaths that call this with nil upkeepID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In unit testing, passing a nil uid led to "nil" strings in the map, which I didn't want
https://smartcontract-it.atlassian.net/browse/AUTO-10164
WIth this PR, we're updating some comments within the buffer implementation, to explicitly declare our assumptions on how the buffer will be used.
Further to this, we're also adding logs to identify scenarios when these assumptions are violated. To achieve this, we use a map to track the number of times we enqueue upkeep logs for a particular block number.
Testing
Running the load test, we don't see the logs appear for enqueuing upkeep logs for the same block number more than once.