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

[Utility][Persistence][Savepoints/Rollbacks] Implement change tracking in UtilityUnitOfWork to allow ephemeral state and remove side effects #564

Open
10 tasks
Tracked by #562
deblasis opened this issue Mar 8, 2023 · 1 comment
Assignees
Labels
core Core infrastructure - protocol related persistence Persistence specific changes utility Utility specific changes

Comments

@deblasis
Copy link
Contributor

deblasis commented Mar 8, 2023

Objective

Extend the UtilityUnitOfWork logic so that it transparently works like an ephemeral "WorldState" that becomes valid/persisted only when it's committed successfully. Until then, all changes are tracked, and applied in memory but NOT persisted.

Origin Document

#562

Goals

  • Obtain a PersistenceReadContext
  • Implement PersistenceWriteContext but track changes in memory instead of targeting the datastores
  • Implement Commit logic that flushes the changes correctly to the real Persistence layer

Deliverable

  • A PR with implementation tending to the goals above
  • Deterministic unit tests to verify the logic above

Non-goals / Non-deliverables

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • Task specific tests or benchmarks: make ...
  • New tests or benchmarks: make ...
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @deblasis
Co-Owners: @Olshansk

@deblasis deblasis added core Core infrastructure - protocol related utility Utility specific changes persistence Persistence specific changes labels Mar 8, 2023
@deblasis deblasis self-assigned this Mar 8, 2023
@jessicadaugherty jessicadaugherty moved this to Up Next in V1 Dashboard Mar 8, 2023
@jessicadaugherty jessicadaugherty changed the title [Utility][Persistence] Implement change tracking in UtilityUnitOfWork to allow ephemeral state and remove side effects [Utility][Persistence][Savepoints/Rollbacks] Implement change tracking in UtilityUnitOfWork to allow ephemeral state and remove side effects Mar 8, 2023
@Olshansk
Copy link
Member

Olshansk commented Mar 9, 2023

The goals make sense to me. Looking forward to seeing the design & implementation around the tree structures for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core infrastructure - protocol related persistence Persistence specific changes utility Utility specific changes
Projects
Status: Backlog
Development

No branches or pull requests

3 participants