apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.15k stars 1.02k forks source link

Use `\xff/metadataVersion` for caching in 6.1+ #2223

Closed kocolosk closed 2 years ago

kocolosk commented 4 years ago

Summary

FoundationDB 6.1 introduces a new feature designed to help layers cache frequently-accessed metadata:

https://forums.foundationdb.org/t/a-new-tool-for-managing-layer-metadata/1191

We have been designing our CouchDB layer to use this new feature, but we still have various 6.0 environments floating around in development so we've got a placeholder key there instead:

https://github.com/apache/couchdb/blob/ff2cdb84f639ea26ac7b1ad85abb0a49c5141c74/src/fabric/include/fabric2.hrl#L17-L26

I'm filing this issue so we don't forget to switch it over.

Desired Behaviour

FoundationDB should deliver the metadataVersion key as part of starting a transaction so we don't need a second roundtrip for it.

Additional context

Blocked until all our development and testing environments are upgraded to FoundationDB 6.1 or greater.

nickva commented 4 years ago

Finished.

Most of the work had to be done to switch the cache validation behavior: https://github.com/apache/couchdb/commit/f3d572caf112598d12d705f98dffb8cdbb2bec97

Then the switch itself was in: https://github.com/apache/couchdb/commit/8d5c10717479a4aaa434f2d5bdb3899e6c07e122

nickva commented 2 years ago

Closing as fixed