<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:Arial;">On Thu, Nov 7, 2019, at 15:46, Anatoli via Cyrus-devel wrote:<br></div><blockquote type="cite" id="qt"><div style="font-family:Arial;">Bron,<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Thanks for your detailed reply and the work the FM team is doing!<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">> This is not easy unfortunately with all the different datastructures,<br></div><div style="font-family:Arial;">> because it means that everything else which takes a lock is going to<br></div><div style="font-family:Arial;">> need to first take a global shared lock before it does anything else,<br></div><div style="font-family:Arial;">> and that's going to have a performance and complexity impact on<br></div><div style="font-family:Arial;">> everything - because you have to find them ALL or you might wind up<br></div><div style="font-family:Arial;">> with lock inversions down the line.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">One solution I see is to have a separate single lock, not even a lock<br></div><div style="font-family:Arial;">per se, but a barrier. I.e. before every write operation<br></div></blockquote><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">How does that maintain consistency?  I guess you don't get skew between files, but you still have to do crash recovery on every file.  There's no single place to put this either.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">I think I still prefer the idea of a shared locks that wraps every single other lock, such that taking the snapshot pauses every attempt to start a new lock until it's done, so you always get a completely clean read equivalent to a clean shutdown.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Bron.<br></div><div id="sig56629417"><div class="signature">--<br></div><div class="signature">  Bron Gondwana, CEO, Fastmail Pty Ltd<br></div><div class="signature">  brong@fastmailteam.com<br></div><div class="signature"><br></div></div><div style="font-family:Arial;"><br></div></body></html>