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

Improved TTL testing UX and cleaned up storage diagnostics. #1412

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

dmkozh
Copy link
Contributor

@dmkozh dmkozh commented Apr 29, 2024

What

Improved TTL testing UX and cleaned up storage diagnostics.

Both improvements rely on passing host into storage methods. This also allows us to use the ledger info and to encapsulate detailed diagnostic errors in the storage module. We have to still keep the old storage methods around. There are a few users of storage getters, which probably don't have to use it, but the clean up will have some time and can only be performed in v22 due to semver.

There is a subtle change in observations because we now only allocate a new object in diagnostic mode (charged to shadow budget). However, this shouldn't cause divergence (because this version of env won't run in p20) and is highly unlikely to affect replay of p20 with the new env. If necessary, we can still emulate the p20 behavior.

The TTL testing support includes:

  • Provide testutil getters for the live_until_ledger of all the ledger entries
  • Treat expired temp entries as non-existent
  • Emit special test-only errors for accessing expired persistent entries

Why

Improving testing UX

Known limitations

N/A

Both improvements rely on passing host into storage methods. This also allows us to use the ledger info and to encapsulate detailed diagnostic errors in the storage module.  We have to still keep the old storage methods around. There are a few users of storage getters, which probably don't have to use it, but the clean up will have some time and can only be performed in v22 due to semver.

There is a subtle change in observations because we now only allocate a new object in diagnostic mode (charged to shadow budget). However, this shouldn't cause divergence (because this version of env won't run in p20) and is highly unlikely to affect replay of p20 with the new env. If necessary, we can still emulate the p20 behavior.

The TTL testing support includes:

- Provide testutil getters for the `live_until_ledger` of all the ledger entries
- Treat expired temp entries as non-existent
- Emit special test-only errors for accessing expired persistent entries
@dmkozh dmkozh added this pull request to the merge queue Apr 30, 2024
Merged via the queue into stellar:main with commit df2c5f7 Apr 30, 2024
17 checks passed
@dmkozh dmkozh deleted the ttl_tests branch April 30, 2024 18:39
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.

None yet

2 participants