Closed jamadden closed 3 years ago
I wrote a new benchmark specifically to exercise readCurrent
conflicts. The good news is that, depending on settings such as concurrency level, I saw up to 22% of read conflict errors being caught by the cache. The bad news is that pyperf didn't report any significant performance difference, positive or negative.
I remain hopeful about impacts on real life though.
Use the cache to cheaply check if a
readCurrent()
violation will take place during an early part of two-phase commit, instead of waiting untiltpc_vote
when we've sent data to the database.If the cache can prove that there is a newer version of an object stored, the conflict error will be raised during
commit
; if the cache can't prove it, the error will still be raised duringtpc_vote
.This more closely matches what
FileStorage
does and can help avoid some unnecessary work.I'm running the micro benchmark suite now, but I'm not expecting it to show any differences (the benchmarks don't actually trigger readCurrent conflicts, but they do use it). (ETA: They don't show any difference.)
/cc @jzuech3 @cutz