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

1843 - limit cache when close to tip #1886

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Conversation

Cmdv
Copy link
Contributor

@Cmdv Cmdv commented Oct 29, 2024

Description

This fixes #1843

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.10.1.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

Migrations

  • The pr causes a breaking change of type a,b or c
  • If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
  • Resyncing and running the migrations provided will result in the same database semantically

If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.

@Cmdv Cmdv force-pushed the 1843-limit-cache-at-tip branch 4 times, most recently from 73a8fa6 to 34bceb6 Compare November 1, 2024 21:40
@Cmdv Cmdv marked this pull request as ready for review November 12, 2024 17:41
@Cmdv Cmdv requested a review from a team as a code owner November 12, 2024 17:41
Copy link
Contributor

@kderme kderme left a comment

Choose a reason for hiding this comment

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

optimiseCaches requires fixing.
Also optomise is sometimes used instead of optimise. Using reduce instead of optimise would also make it more specific, since the cache is reduced.
Finally, using patterns as suggested could reduce the cases.

@Cmdv Cmdv force-pushed the 1843-limit-cache-at-tip branch from 46a3f01 to 54fcebb Compare November 27, 2024 13:25
@Cmdv Cmdv force-pushed the 1843-limit-cache-at-tip branch from 54fcebb to a28f1de Compare November 27, 2024 14:42
Copy link
Contributor

@kderme kderme left a comment

Choose a reason for hiding this comment

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

possibly the new boolean flag need to become a TVar

Copy link
Contributor

@kderme kderme left a comment

Choose a reason for hiding this comment

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

Just a few stylistic changes and this is good to go

@Cmdv Cmdv force-pushed the 1843-limit-cache-at-tip branch from 1db8911 to 26346a2 Compare November 29, 2024 09:53
@kderme kderme merged commit d54c3f3 into master Dec 3, 2024
12 of 18 checks passed
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.

Disable or limit caches when db-sync reaches the tip of the chain
2 participants