-
Notifications
You must be signed in to change notification settings - Fork 51
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
LogPoller support for MaxLogsKept #1338
Open
reductionista
wants to merge
55
commits into
ccip-develop
Choose a base branch
from
max-logs-kept-tests
base: ccip-develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reductionista
changed the title
Max logs kept tests: DO NOT MERGE
Testing MaxLogsKept feature: DO NOT MERGE
Aug 21, 2024
reductionista
changed the title
Testing MaxLogsKept feature: DO NOT MERGE
Alpha testing of MaxLogsKept LogPoller feature: DO NOT MERGE
Aug 21, 2024
reductionista
changed the title
Alpha testing of MaxLogsKept LogPoller feature: DO NOT MERGE
Testing of MaxLogsKept LogPoller feature: DO NOT MERGE
Aug 21, 2024
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
August 21, 2024 20:15
ca7b2d5
to
738ef14
Compare
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
August 21, 2024 23:24
738ef14
to
a050b2e
Compare
reductionista
changed the title
Testing of MaxLogsKept LogPoller feature: DO NOT MERGE
LogPoller support for MaxLogsKept
Aug 21, 2024
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
August 22, 2024 00:05
3101bcf
to
33ad38b
Compare
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
August 24, 2024 00:38
33ad38b
to
707c330
Compare
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
August 29, 2024 16:43
814b898
to
0a76672
Compare
Also, remove some extraneous lines in orm_test.go
- Remove topics from SelectExcessLogs query - Early exit from loadFilters - upper >= end
reductionista
force-pushed
the
max-logs-kept-tests
branch
from
October 12, 2024 01:55
e33f9cc
to
2500099
Compare
Quality Gate failedFailed conditions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Presently, LogPoller supports only time-based retention, via the Retention field in the filters passed to
RegisterFilter
. TheMaxLogsKept
field was added earlier in anticipation of the need for also supporting recency-count based retention. One example of a case where time based retention is risky is theTransmit
event in the OCR Contract Transmitter. No matter how long the retention period is set to, there's a chance the node will be down for longer than that, and miss logs when it comes back up. This would make a bad situation even worse, because the transmit event would never be picked up at all.Solution
This implements the MaxLogsKept feature in LogPoller. When specified, this field tells LogPoller it's okay to prune logs matching a filter if there are at least
MaxLogsKept
more recent matching logs in the db.In the example above, this avoid storing any more logs than needed while always having the latest transmit event available. In this case, older transmit events are no longer relevant if there is a more recent one.
In general, this should be just as useful for anything accessed only via ChainReader's
GetLatestValue()
method rather thanQueryKey()
.A log may be pruned either because it's too old in terms of time or in terms of the number of logs being saved. It need not satisfy both the
Retention
andMaxLogsKept
criteria in order to get pruned.