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

Clean summary cache on node up and summary #1144

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Jul 3, 2023

Description

Fixes the issue where sometime the summary cache was not properly cleaned and so could create a summary with 2 summary inside.
Now 2 summary backup are kept, the current one and the previous one.
The previous summary slots in ets table are cleared right after being uses by subset.
On event node_up, backup file and ets table is cleaned.

Fixes #1138

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit test

Runned 2 nodes, send to one a node_down event before a summary and send a node_up after the summary, ets table is cleaned as expected.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added bug Something isn't working beacon chain Involve BeaconChain labels Jul 3, 2023
@Neylix Neylix added this to the 1.2.4 milestone Jul 3, 2023
@Neylix Neylix changed the base branch from develop to release/1.2.4 July 3, 2023 16:25
@samuelmanzanera samuelmanzanera merged commit 4163152 into archethic-foundation:release/1.2.4 Jul 10, 2023
2 checks passed
@Neylix Neylix deleted the Clean-summary-cache branch July 10, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beacon chain Involve BeaconChain bug Something isn't working
Projects
Status: Done 🍻
Development

Successfully merging this pull request may close these issues.

SummaryCache should clean previous date properly
3 participants