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

Handling conflict responses #26

Merged
merged 42 commits into from
Jul 5, 2022
Merged

Handling conflict responses #26

merged 42 commits into from
Jul 5, 2022

Conversation

tmpfs
Copy link
Collaborator

@tmpfs tmpfs commented Jul 2, 2022

To sync client WAL start from the server WAL.

tmpfs added 30 commits July 2, 2022 09:11
The root hash is enough to determine consistency.
So that a client when attempting to patch a remote WAL and getting a
CONFLICT response status that includes information that proves that the
client root commit is included in the server commit tree (client is
behind the remote) then it will pull the remote WAL and attempt to retry
applying the patch on top of the earlier changes.
Prepare to mirror in-memory vaults to disc in the shell client.
Improve logic for creating accounts in client CLI.
Prepare for user input when a conflict occurs.
Sketch draft version of a force pull.
Creates backup copies of any existing vault and WAL files, creates an
empty new local WAL file, pulls the WAL from the remote server and
applies any outstanding changes from the patch file over the top of the
new local WAL file and then updates the in-memory version of the vault.
Was commented out to test the conflict handling on the client.
Calling create generated the id and mirroring to disc would generate a
different id so added an insert() function and use that in the
gatekeeper to ensure identifiers are mirrored correctly.
Integrated with the client force_pull() logic so that it uses a snapshot
as a backup for potentially lossy operations.
Do not store an index file use the snapshot modification time as the
timestamp instead.
tmpfs added 12 commits July 4, 2022 13:18
Also update the server backend to use the snapshot manager to create a
backup when replacing the contents of a WAL file.

Closes #31.
So the new WAL file is pushed to the server.
Wrong OpenType when creating the file stream to update the number of
patch events.

Closes #32.
Moved the compact command to a subcommand of history and asked for
confirmation before compaction.

Improvements to the display formatting of Timestamp to support RFC3339 and RFC2822.

Implement `history check` to verify the integrity of the current WAL
file and `history ls` to list the events in the current WAL.

Minor changes to prefer append() to extend_from_slice() where possible.

Closes #29.
@tmpfs tmpfs merged commit 8d5728f into main Jul 5, 2022
@tmpfs tmpfs deleted the conflict branch July 16, 2022 05:11
tmpfs added a commit that referenced this pull request Jan 28, 2023
* Do not send commit recipts in patch_wal().

The root hash is enough to determine consistency.

* Work in progress resolving conflicts.

* Run cargo fmt.

* Restore the public directory for CI.

* Fix commit compare logic.

* Support binary encoding for commit proof.

* Prepare server for new header encoding.

* Prepare new commit proof encoding on server and client.

* Debug commit proof logic.

* Draft logic for retry on conflict.

So that a client when attempting to patch a remote WAL and getting a
CONFLICT response status that includes information that proves that the
client root commit is included in the server commit tree (client is
behind the remote) then it will pull the remote WAL and attempt to retry
applying the patch on top of the earlier changes.

* Tidy patch conflict handling.

* Do not derive in headers.

* Support mirror in Gatekeeper.

Prepare to mirror in-memory vaults to disc in the shell client.

* Improve caching client implementation.

* Remove create vault command from client CLI.

* Rename the match proof header.

* Prepare for vault mirror support.

Improve logic for creating accounts in client CLI.

* Propagate conflict error.

Prepare for user input when a conflict occurs.

* Tidy constants handling.

* Tidy core module exports.

* Remove deprecated passphrase module.

* Tidy exports.

* Improve conflict handling.

Sketch draft version of a force pull.

* Prepare for patch file support.

* Initial force pull implementation.

Creates backup copies of any existing vault and WAL files, creates an
empty new local WAL file, pulls the WAL from the remote server and
applies any outstanding changes from the patch file over the top of the
new local WAL file and then updates the in-memory version of the vault.

* Restore soft conflict handling in the server.

Was commented out to test the conflict handling on the client.

* Fix id problem with vault mirroring.

Calling create generated the id and mirroring to disc would generate a
different id so added an insert() function and use that in the
gatekeeper to ensure identifiers are mirrored correctly.

* Fix bug with set command, closes #28.

* Draft snapshot implementation.

Integrated with the client force_pull() logic so that it uses a snapshot
as a backup for potentially lossy operations.

* Simplify snapshot manager.

Do not store an index file use the snapshot modification time as the
timestamp instead.

* Move CommitHash type.

* Add snapshot commands to the shell client.

Also update the server backend to use the snapshot manager to create a
backup when replacing the contents of a WAL file.

Closes #31.

* Prepare for compact shell command.

* Fix bugs with patch file implementation.

* Improve compact logic.

So the new WAL file is pushed to the server.

* Fix bad file descriptor error.

Wrong OpenType when creating the file stream to update the number of
patch events.

Closes #32.

* Remove obsolete UpdateVault variant.

* Update readme.

* Updated public files for the server webapp.

* Update signature for appending audit logs.

* Support history command.

Moved the compact command to a subcommand of history and asked for
confirmation before compaction.

Improvements to the display formatting of Timestamp to support RFC3339 and RFC2822.

Implement `history check` to verify the integrity of the current WAL
file and `history ls` to list the events in the current WAL.

Minor changes to prefer append() to extend_from_slice() where possible.

Closes #29.

* Use choice for conflict handling.
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.

1 participant