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

Handle mismatches between oplog + known ops #1

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

julienvincent
Copy link
Contributor

The current implementation handles mismatches between the op-log and known set of operations quite badly.

It is required that the current op-log head points to a known and explicitly provided operation.

This can cause issues in the following scenarios:

  • Working accross two different branches and applied operations from one branch not existing in the second.
  • Deleting applied operations because it is no longer desireable to keep the code around.

Another issue exists as a result of this approach; information regarding the order in which operations were actually applied is lost. This may be distinct from the order in which operations were provided.

When executing in the :down direction it would be safer to execute in the reverse order to which operations were applied.

This commit resolves this issue by:

  • No longer requiring operations that have been applied to be provided at all.
  • Re-ordering operations based on the order they appear in the op-log.

The current implementation handles mismatches between the op-log and
known set of operations quite badly.

It is required that the current op-log head points to a known and
explicitly provided operation.

This can cause issues in the following scenarios:

+ Working accross two different branches and applied operations from one
  branch not existing in the second.
+ Deleting applied operations because it is no longer desireable to keep
  the code around.

Another issue exists as a result of this approach; information regarding
the order in which operations were actually applied is lost. This may be
distinct from the order in which operations were provided.

When executing in the :down direction it would be safer to execute in
the reverse order to which operations were applied.

This commit resolves this issue by:
+ No longer requiring operations that have been applied to be provided at all.
+ Re-ordering operations based on the order they appear in the op-log.
@julienvincent julienvincent merged commit 1a2fc93 into master Feb 4, 2024
1 check passed
@julienvincent julienvincent deleted the jv/better-oplog-processing branch February 4, 2024 16:55
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