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

fix: atomic writes #259

Merged
merged 9 commits into from
Jun 22, 2023
Merged

fix: atomic writes #259

merged 9 commits into from
Jun 22, 2023

Conversation

fominok
Copy link
Collaborator

@fominok fominok commented Jun 20, 2023

Issue being fixed or feature implemented

This PR removes previously existing means to write straight ahead to storage from a subtree.

What was done?

  1. 2 out of 4 StorageContext implementations were removed and replaced with batched versions as they semantically meant immediate write access to the storage, which causes non-atomic behavior as almost all GroveDB modifications involve changes to multiple subtrees.
  2. However, I had to add one context back (slightly simplified version because we don't need costs) because replication requires immediate write access
  3. Removed CrashMerk and crash test as irrelevant to Merk

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@fominok fominok marked this pull request as ready for review June 20, 2023 17:02
grovedb/src/operations/insert/mod.rs Outdated Show resolved Hide resolved
grovedb/src/operations/insert/mod.rs Outdated Show resolved Hide resolved
grovedb/src/replication.rs Outdated Show resolved Hide resolved
grovedb/src/replication.rs Outdated Show resolved Hide resolved
@QuantumExplorer QuantumExplorer merged commit fb88772 into develop Jun 22, 2023
7 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/atomic-writes branch June 22, 2023 19:14
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

3 participants