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 bitcask_pulse model to know when a keydir may have been frozen. #181

Open
wants to merge 2 commits into
base: develop-3.0
Choose a base branch
from

Conversation

slfritchie
Copy link
Contributor

Fixes #180.

  • Rename bitcask_nifs:keydir_remove/3 -> * bitcask_nifs:keydir_remove_int/3
  • Use a compile-time -ifdef magic to add pulse_log_call() wrappers
    around all keydir NIF calls that can mutate the keydir.
  • Make several changes to the bitcask_pulse model:
    • Filter out bad reads from either kind of bad folds
    • If a bad read happens, that's bad
    • If a bad fold happens, then figure out during what period of
      at-last-one-folder-is-running-time that the bad result appeared.
      Then figure out if a keydir mutating NIF was called; if yes,
      then it's possible that the keydir was frozen ... we don't know
      for sure, but we won't cause the model to fail in this case.

* Rename `bitcask_nifs:keydir_remove/3` -> * `bitcask_nifs:keydir_remove_int/3`

* Use a compile-time -ifdef magic to add `pulse_log_call()` wrappers
around all keydir NIF calls that can mutate the keydir.

* Make several changes to the bitcask_pulse model:

    * Filter out bad reads from either kind of bad folds
    * If a bad read happens, that's bad
    * If a bad fold happens, then figure out during what period of
      at-last-one-folder-is-running-time that the bad result appeared.
      Then figure out if a keydir mutating NIF was called; if yes,
      then it's possible that the keydir was frozen ... we don't know
      for sure, but we won't cause the model to fail in this case.
@slfritchie slfritchie added this to the 2.0 milestone Jul 16, 2014
@slfritchie slfritchie self-assigned this Jul 16, 2014
@slfritchie
Copy link
Contributor Author

cc: @engelsanchez @jonmeredith

1. Use `keydir_call` and `keydir_return` for the trace labels
for NIF mutations.

2. Only consider *successful* mutations when checking for keydir frozenness.
@slfritchie
Copy link
Contributor Author

ping?

1 similar comment
@slfritchie
Copy link
Contributor Author

ping?

@slfritchie
Copy link
Contributor Author

@engelsanchez Whatchathink about this model change?

@engelsanchez
Copy link
Contributor

Honestly @slfritchie, I'd like to do this in a different way. I think it should be possible to change our internal API to expose the epochs generated inside of Bitcask that determine the visibility of the values for the folds, as well as the epochs used when folding to verify. That way we can determine exactly what we should be seeing and have a stricter model. I will try to give that a go in the 2.0.2 cycle.

@martincox martincox changed the base branch from develop to develop-3.0 January 26, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete found in fold operation (counterexample Cp8)
2 participants