Skip to content

add Reset() for spm and ewl#7803

Merged
ssd04 merged 3 commits intoasync-trie-prunning-triggerfrom
reset-for-storage-pruning-manager
Mar 26, 2026
Merged

add Reset() for spm and ewl#7803
ssd04 merged 3 commits intoasync-trie-prunning-triggerfrom
reset-for-storage-pruning-manager

Conversation

@BeniaminDrasovean
Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

Proposed changes

Testing procedure

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
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Reset() support to the state pruning components to allow clearing in-memory pruning state (storage pruning buffer + eviction waiting list), along with test/mocks updates to support the new interface methods.

Changes:

  • Extend state.DBRemoveCacher and state.StoragePruningManager interfaces with Reset().
  • Implement Reset() for storagePruningManager, memoryEvictionWaitingList, and their disabled/test doubles.
  • Add a unit test validating storagePruningManager.Reset() clears the pruning buffer and resets the eviction waiting list.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
testscommon/state/storagePruningManagerStub.go Adds Reset() hook to the pruning manager stub for tests.
testscommon/state/evictionWaitingListMock.go Adds Reset() to the eviction waiting list mock.
state/storagePruningManager/storagePruningManager_test.go Adds coverage for StoragePruningManager.Reset().
state/storagePruningManager/storagePruningManager.go Implements Reset() to clear pruning buffer and reset eviction waiting list.
state/storagePruningManager/evictionWaitingList/memoryEvictionWaitingList.go Implements Reset() for the in-memory eviction waiting list.
state/storagePruningManager/disabled/disabledStoragePruningManager.go Adds no-op Reset() to the disabled implementation.
state/interface.go Extends interfaces to include Reset().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ssd04 ssd04 merged commit 4ad7332 into async-trie-prunning-trigger Mar 26, 2026
7 checks passed
@ssd04 ssd04 deleted the reset-for-storage-pruning-manager branch March 26, 2026 10:54
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