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

Test pruning storer #6667

Merged
merged 7 commits into from
Dec 18, 2024
Merged

Conversation

BeniaminDrasovean
Copy link
Contributor

Reasoning behind the pull request

  • There is an edgecase in which if a node starts with dbLookupExtension set to true, it will not remove any old dbs. In this case the node will create a FullHistoryPruningStorer that can create a new db for a new epoch if some methods are called. When the changeEpoch trigger is activated, the new db already exists, thus not executing the code that should close older dbs.

Proposed changes

  • On changeEpoch, even if a db was already created, also check if older dbs need to be removed

Testing procedure

  • Normal testing procedure
  • Test with full-archive, db-lookup-extension, historical-balances, snapshotless-observer node operation mode and check that the dbs will be kept or removed as they should be.

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

Copy link

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 1beb4ca88778ac0dda512234f45df59107e3c3a5
  • Current Branch: test-pruning-storer
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main

🚀 Environment Variables:

  • TIMESTAMP: 11122024-120303
  • PYTEST_EXIT_CODE: 0
    🎉 MultiversX CI/CD Workflow Complete!

@sasurobert sasurobert self-requested a review December 11, 2024 12:10
sasurobert
sasurobert previously approved these changes Dec 11, 2024
@BeniaminDrasovean BeniaminDrasovean changed the base branch from master to rc/spica-patch-relayedv3 December 11, 2024 12:50
@BeniaminDrasovean BeniaminDrasovean dismissed sasurobert’s stale review December 11, 2024 12:50

The base branch was changed.

Copy link

⚠️ No report was generated due to an error or cancellation of the process.
Please checkout gh action logs for details

return ps.removeOldPersistersIfNeeded(header, epoch)
}

func (ps *PruningStorer) removeOldPersistersIfNeeded(header data.HeaderHandler, epoch uint32) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we pass only one argument, either the epoch or the header?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link

⚠️ No report was generated due to an error or cancellation of the process.
Please checkout gh action logs for details

Copy link
Collaborator

@danidrasovean danidrasovean left a comment

Choose a reason for hiding this comment

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

Normal allin test: v1.8.4-dev-config-171a31edab -> test-pruning-storer-fee796fb44

--- Specific errors ---

block hash does not match 1907
wrong nonce in block 829
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 0
Nr. of all WARNS: 416
Nr. of new ERRORS: 0
Nr. of new WARNS: 15
Nr. of PANICS: 0
Nodes with panic: []

/------/

--- System test go ---

All scenarios from system-test-go are OK!
/------/

--- ERRORS ---

/------/

--- WARNINGS ---

/------/

Copy link

⚠️ No report was generated due to an error or cancellation of the process.
Please checkout gh action logs for details

@BeniaminDrasovean BeniaminDrasovean merged commit 6a74c03 into rc/spica-patch-relayedv3 Dec 18, 2024
7 of 8 checks passed
@BeniaminDrasovean BeniaminDrasovean deleted the test-pruning-storer branch December 18, 2024 09:04
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.

4 participants