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

Improve recoverer efficiency #13779

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const (
logTriggerStateDropped logTriggerState = iota
// the log was enqueued by the buffer
logTriggerStateEnqueued
// the log was visited/dequeued from the buffer
// the log was queuedForRecovery/dequeued from the buffer
logTriggerStateDequeued
)

Expand All @@ -293,7 +293,7 @@ type logTriggerStateEntry struct {
}

// upkeepLogQueue is a priority queue for logs associated to a specific upkeep.
// It keeps track of the logs that were already visited and the capacity of the queue.
// It keeps track of the logs that were already queuedForRecovery and the capacity of the queue.
type upkeepLogQueue struct {
lggr logger.Logger

Expand Down Expand Up @@ -412,7 +412,7 @@ func (q *upkeepLogQueue) enqueue(blockThreshold int64, logsToAdd ...logpoller.Lo
if added > 0 {
q.orderLogs()
dropped = q.clean(blockThreshold)
q.lggr.Debugw("Enqueued logs", "added", added, "dropped", dropped, "blockThreshold", blockThreshold, "q size", len(q.logs), "visited size", len(q.states))
q.lggr.Debugw("Enqueued logs", "added", added, "dropped", dropped, "blockThreshold", blockThreshold, "q size", len(q.logs), "queuedForRecovery size", len(q.states))
}

prommetrics.AutomationLogBufferFlow.WithLabelValues(prommetrics.LogBufferFlowDirectionIngress).Add(float64(added))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ func (p *logEventProvider) getLogsFromBuffer(latestBlock int64) []ocr2keepers.Up
}

payloads = p.minimumCommitmentDequeue(latestBlock, start)

// if we have remaining capacity following minimum commitment dequeue, perform a best effort dequeue
if len(payloads) < MaxPayloads {
payloads = p.bestEffortDequeue(latestBlock, start, payloads)
Expand Down
Loading
Loading