Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
6.5.0
-
None
Description
We now have access to folly in the server build. In KV-Engine, these are some improvements that we would like to make.
Replace RCPtr with folly::atomic_shared_ptrRCPtr has since been removed: http://review.couchbase.org/c/kv_engine/+/127523- Replace existing Folly backports with "real" folly
- AtomicBitSet (note we do need look at the things we've change, including changing BlockType to uint8_t).
- folly::Synchronised<>/SynchronizedPtr<> for:
- CheckpointManager::checkpointList
StreamContainer- replaced with folly::SharedMutex via https://review.couchbase.org/c/kv_engine/+/112153DcpConsumer::ready/readyMutex- fixed via https://review.couchbase.org/c/kv_engine/+/114683.
- chmod() (folly portabiility), used in ep_testsuite
- folly::symbolizer() in gtest main (https://github.com/facebook/folly/blob/3af92dbe6849c4892a1fe1f9366306a2f5cbe6a0/folly/experimental/symbolizer/test/Crash.cpp#L20)
folly::AccessSpreader appears to be a more efficient version of per-core lookup - look to use inside CoreLocal.Done- Replace usages of our AtomicUnorderedMap with one of the folly maps to effectively shard locking
Replace usages of our AtomicQueue with folly::UMPMCQueue or similar (as used by ConnMap::pendingNotifications).That would also allow ThreadLocal to be removed as AtomicQueue is last remaining user.