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

Clarify issue of PreviousClock undefined with native store #52

Open
martinsumner opened this issue Dec 12, 2018 · 0 comments
Open

Clarify issue of PreviousClock undefined with native store #52

martinsumner opened this issue Dec 12, 2018 · 0 comments

Comments

@martinsumner
Copy link
Owner

If the PreviousClock is undefined, and the store is native the previous clock is not fetched, and is instead assumed to be the same as the passed clock.

https://github.com/martinsumner/kv_index_tictactree/blob/master/src/aae_controller.erl#L648-L661

There are two scenarios where the previous clock may be undefined:

  • On a rehash
  • On a fast-write-path put (with no read before write)

The latter part cannot happen in a native store in Riak. This is because read-before-write puts are disabled for a backend with the 2i capability (and IndexBackend).

In either case fetching the previous object clock that doesn't make sense, as the database may have moved on since the aae_put was cast. The clock might now be a future clock, a present clock or a previous clock.

The implemented behaviour is probably the right behaviour - but it should be more obvious and explicit that native mode will not do the potentially expected thing when run in native mode, rather than mysteriously doing something inert.

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

No branches or pull requests

1 participant