nickva commented on pull request #2952:
URL: https://github.com/apache/couchdb/pull/2952#issuecomment-650584859


   > The first thing I realized is that by using the centralized 
metadataVersion, I think we're basically causing all in-flight write 
transactions to retry
   
   We are doing md version reads at the snapshot level isolation 
https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/fabric/src/fabric2_fdb.erl#L1273
 so don't think they should retry. But it is worth checking if it is not too 
difficult.
   
   > we should be going back all the way to the directory layer to check that 
our directory hasn't been renamed and what not. That means each time the 
metadataVersion key we're now adding an extra ~5-10 KV lookups in those cases.
   
   That is legit it. Good point.  I don't think we technically have any place 
where we programmatically bump the md version when directory layer updates 
(we'd do it manually), but still for correctness and completeness we should 
revalidate it. We already do it for full re-opens (when db version and md 
versions are stale: 
https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/fabric/src/fabric2_fdb.erl#L134)
 so we should do it on md changes as well.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to