Open ndmitchell opened 4 years ago
I suggest reviewing it in it's current state - there was one bug I introduced, just fixed.
write before read: This looks good to me, and i'm gonna type out my logic here in case I am wrong.
There are 4 possiblities:
read before write: This one also looks good to me except I think the 3rd condition (where order in required list is checked) should be Recoverable and not Restartable?? Because Rattle began by speculating the read too soon...
The patch in https://github.com/ndmitchell/rattle/commit/170981ca947cf6446f2857d6db32b8b8e350b02c changes Hazard set merging, which I got wrong in the past. It removes the requirement to find when a command was speculated (which means doing it in O(log n) is way easier). I think it subtly changes the nature of a hazard, but in ways that improve it. Would be good for @spall to carefully review it.
On the plus side, after reworking that code, I completely understand the hazards/speculation stuff @spall was talking about in #13.