Skip to content

Allow a period for draining inflight aggregation when stopping aggreg…#803

Merged
carte7000 merged 5 commits intomainfrom
simon/aggregator/allow-drain-period-when-stopping-service
Mar 2, 2026
Merged

Allow a period for draining inflight aggregation when stopping aggreg…#803
carte7000 merged 5 commits intomainfrom
simon/aggregator/allow-drain-period-when-stopping-service

Conversation

@carte7000
Copy link
Copy Markdown
Contributor

…ator

@carte7000 carte7000 marked this pull request as ready for review March 2, 2026 16:04
@carte7000 carte7000 requested review from a team and skudasov as code owners March 2, 2026 16:05
@carte7000 carte7000 enabled auto-merge March 2, 2026 16:05
for {
select {
case request := <-aggregationChannel:
submitWork(request)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A bit weird to receive on the aggregationChannel here as well as line 210.

Is there a way to perform the cleanup on the aggregationChannel level? IE close the aggregationChannel after drainPeriod and then use that as a signal to clean up on the worker level.

Alternatively, can we create the go func() { waitDone <- p.Wait() }() inside StartBackground?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 2, 2026

Code coverage report:

Package main simon/aggregator/allow-drain-period-when-stopping-service diff
github.com/smartcontractkit/chainlink-ccv/aggregator 47.39% 48.09% +0.70%
github.com/smartcontractkit/chainlink-ccv/bootstrap 51.13% 51.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/committee 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 52.89% 52.89% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.16% 45.16% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.80% 35.80% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 41.32% 41.44% +0.12%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 64.71% 64.82% +0.11%
github.com/smartcontractkit/chainlink-ccv/verifier 41.68% 41.69% +0.01%

@carte7000 carte7000 requested a review from 0xAustinWang March 2, 2026 19:02
for _, key := range m.clientOrder {
ch := m.clientChannel[key]
if len(ch) > 0 {
m.AggregationChannel <- <-ch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is cool

@carte7000 carte7000 added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit 35b71fa Mar 2, 2026
23 of 24 checks passed
@carte7000 carte7000 deleted the simon/aggregator/allow-drain-period-when-stopping-service branch March 2, 2026 19:25
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