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

CNS-496: fixation allow append after delete #660

Merged
merged 14 commits into from
Aug 2, 2023

Conversation

orenl-lava
Copy link
Contributor

Changed fixation to allow AppendEntry() after DelEntry() takes effect, with the following new rules:

  • AppendEntry() may add retroactive entry only if it does not precede an existing latest entry.
  • AppendEntry() may not add future entries on or beyond a DeletedAt in the future.
  • Adding a future entry maturing on a future DeleteAt is permitted but useless, because it will be deleted straight away).
  • DelEntry() discards all future entries on or beyond the DeletedAt (and owing to the previous rule, none will be added until thy delete actually takes place).

Also fix a few glitches in the previous code:

  • The check for retroactive invalid Append was off-by-one.
  • If the first entry appended was future - the code did not set a time for its maturity block (so it never matures)
  • Deleted entries incorrectly retained their IsLatest flag
  • Entries with DeleteAt superseded by maturing future entries incorrectly retained their DeleteAt
  • Fixation testing advanced multiple block without going calling AdvanceBlock() for each block

@orenl-lava orenl-lava requested review from Yaroms and oren-lava July 30, 2023 19:35
Base automatically changed from CNS-489-fixation-handle-latest-put to main July 31, 2023 14:39
@Yaroms Yaroms changed the base branch from main to ARC-1-new-consumer-design July 31, 2023 14:42
@Yaroms Yaroms changed the base branch from ARC-1-new-consumer-design to main July 31, 2023 14:42
@Yaroms Yaroms merged commit 810603e into main Aug 2, 2023
@Yaroms Yaroms deleted the CNS-496-fixation-allow-append-after-delete branch August 2, 2023 12:26
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.

2 participants