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

Evict persistent entries to Hot Archive #4585

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

SirTyson
Copy link
Contributor

Description

Resolves #4395

This PR evicts persitent entries to the Hot Archive in p23. Specifically, the background eviction scan will delete expired persistent entries from the live bucketlist and add them to the hot archive. This change also includes eviction meta for these types.

Operations have not yet been modified to work with the evicted entries. This means that InvokeHostFunctionOp does not check the hot archive for the existence of archived entries, and RestoreFootprintOp will not be able to restore evicted entries. These changes will be added in a follow up PR.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

@SirTyson SirTyson requested a review from dmkozh December 19, 2024 21:56
@SirTyson SirTyson mentioned this pull request Jan 2, 2025
6 tasks
dmkozh
dmkozh previously approved these changes Jan 3, 2025
@SirTyson SirTyson added this pull request to the merge queue Jan 6, 2025
Merged via the queue into stellar:master with commit 8565a39 Jan 6, 2025
13 checks passed
@SirTyson SirTyson deleted the persitent-eviction branch January 6, 2025 19:37
github-merge-queue bot pushed a commit that referenced this pull request Jan 15, 2025
# Description

Resolves #4584

This PR adds support for the Hot Archive to TX apply. Specifically,
`InvokeHostFunctionOp` will check both the live BucketList and Hot
Archive BucketList for archived entries. The `RestoreFootprintOp` can
now restore entries from both the live BucketList and Hot Archive.

Additionally, restore meta has also changed for p23. The
`LEDGER_ENTRY_RESTORED` type has been added for the restore op. When an
entry is restored. both the `LedgerEntry` of the restored data and the
corresponding `TTL` entry are emitted as `LEDGER_ENTRY_RESTORED
LedgerEntryChangeType`. If the entry has not yet been evicted (such that
the entry and it's TTL still exist in the live BucketList), the
preexisting TTL value will be emitted as `LEDGER_ENTRY_STATE`. If the
entry has been evicted such that the TTL value has been previously
deleted, only a single change type of `LEDGER_ENTRY_RESTORED` will be
emitted for the new value. For the data being restored,
`LEDGER_ENTRY_STATE` is never emitted.

Rebased on #4585.

# Checklist
- [x] Reviewed the
[contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes)
document
- [x] Rebased on top of master (no merge commits)
- [x] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio
extension)
- [x] Compiles
- [x] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the
[performance
document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
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.

Evict persistent entries to Hot Archive during eviction scans
2 participants