-
Notifications
You must be signed in to change notification settings - Fork 34
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
PL-2L(monotonic-view) G-monotonic: experiment with adding the anomaly #25
Comments
I'm afraid I haven't worked at all on causal or PL-2L yet--nobody's actually asked me to check those properties yet. There's a few definitions in consistency-models.clj, but that's just as a "this can catch occasional anomalies and "having these partial definitions might be useful later if someone takes on these models in more detail" rather than "Elle knows about all forms of anomalies in every consistency model". It'd certainly be nice if it did, haha. G-single and G-monotonic aren't interchangeable. Elle's G-single is taken directly from Adya's G-single definition, and is defined over DSGs. G-monotonic is defined over USG(H, T_i), which doesn't (presently) exist in Elle. They're not the same graph, which is probably why you're seeing Weird Results here. ;-) G-single-process is a boundary anomaly for strong-session SI. Pulling it out into a weaker isolation level probably broke the BFS phase of the anomaly search. I imagine something like "the cycle existence pass says there was a strong-session-SI cycle, but also found no cycles that would arise in weaker isolation levels. From this we know that any search for boundary anomalies at levels lower than strong-session-SI are redundant, so we won't bother searching for G-single-process at all".
Maybe? I don't personally have a need for it yet, but if it's important for your use case you could add it. The naive definition is O(n^2), so you'll want to do Something Clever (TM)--perhaps it could be unified with the internal passes in list-append and rw-register. I could be convinced to take a PR for this, but it needs to be relatively simple and not impose, say, huge performance/memory penalties on the rest of the system. Either that or we put it behind a flag.
Maybe. I'm not sure about that one. Would need to look carefully at the formalism's event order and prove it's equivalent to process order plus whatever additional constraints--they're not the same.
I'm afraid not--they're not the same anomaly. I'm not sure exactly all the ways this would cause Elle to be wrong, but it would definitely be wrong in some ways. ;-) |
Thanks for such an informative response! I will try creating a USG, use a PL-2L-cycle-exists, etc, and report back.
Thinking comparable to the other cycle-exists in performance and implementation. |
Hi,
I'm working on using Elle as a checker for causal consistency.
Yes, the CRDTs are finally coming in the form of local first sync layers. :)
While testing with
:consistency-models [:consistent-view]
, it seemed like lots of anomalies were not being caught.Looking at the graphs and cycle-anomalies, consistent-view was:
Looking at how elle.txn used -process, reportable-anomalies, etc lead to looking at Adya's Weak Consistency to see where process order and the expected anomalies were introduced. And in 4.2.2 PL-2L:
Which Elle expresses as:
And if we test using
G-single-process
as additional:anomalies [:G-single-process]
:🎉
It also catches more writes-follow-reads in other tests too.
But if
G-single-process
is added to thedirect-proscribed-anomalies
:We no longer find the
G-single-item-process
, but only the stronger consistencystrong-session-snapshot-isolation-cycle-exists
:I've looked at opts
:anomalies
handling inprohibited-anomaly-types
, cycle identification incycle-explainer
, and a few other places and I can't find anything anomalous. :)I do think that:
monotonic-view
'sG-monotonic
needs to be expressed, it's currently a no-opconsistent-view
, has to end up with process orderG-monotonic
, asG-single-process
, would:- more correctly identify what consistency level you are and
:not
:also-not
- catch some of the tests labeled not possible to catch at the given consistency level as they are actually writes-follows-reads and/or monotonic-writes anomalies.
Was hoping you would be able to confirm that this is generally a good idea, desired?
And if so, any ideas on where to look to understand and change the behavior?
Thanks!
(P.S. This is my first time really trying to understand DAGs, cycles, etc and Elle is a wonderful teaching tool. I keep thinking, Wow! It's as if Elle was designed for this, then remembering it most certainly was. 😆
The text was updated successfully, but these errors were encountered: