The package rpms/cachelib.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cachelib.git/commit/?id=c746c7083....
Change:
+ExcludeArch: aarch64
Thanks.
Full change:
============
commit 4913bb557a7d07dae467a6d62626f0de9939aa2b
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Feb 28 12:08:06 2022 -0800
Add new patch and retire old merged patches
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/cachelib-install_cachebench_so.patch b/cachelib-install_cachebench_so.patch
deleted file mode 100644
index a7e4c5a..0000000
--- a/cachelib-install_cachebench_so.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -ruN
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/cachebench/CMakeLists.txt
CacheLib-install_cachebench_so/cachelib/cachebench/CMakeLists.txt
----
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/cachebench/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
-+++ CacheLib-install_cachebench_so/cachelib/cachebench/CMakeLists.txt 2021-12-22
11:23:22.159017377 -0800
-@@ -49,6 +49,15 @@
- )
-
-
-+if (BUILD_SHARED_LIBS)
-+ install(
-+ TARGETS cachelib_cachebench
-+ EXPORT cachelib-exports
-+ DESTINATION ${LIB_INSTALL_DIR}
-+ )
-+endif ()
-+
-+
- if (BUILD_TESTS)
- add_library (cachebench_test_support INTERFACE )
- target_link_libraries (cachebench_test_support INTERFACE
diff --git a/cachelib-ld_gtest.patch b/cachelib-ld_gtest.patch
deleted file mode 100644
index 0e42dc9..0000000
--- a/cachelib-ld_gtest.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ruN
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/common/CMakeLists.txt
CacheLib-ld_gtest/cachelib/common/CMakeLists.txt
----
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/common/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
-+++ CacheLib-ld_gtest/cachelib/common/CMakeLists.txt 2021-12-22 10:21:59.259653149 -0800
-@@ -21,15 +21,11 @@
- CountDownLatch.cpp
- ${BLOOM_THRIFT_FILES}
- hothash/HotHashDetector.cpp
-- hothash/HotHashDetectorTest.cpp
- PercentileStats.cpp
- PeriodicWorker.cpp
- piecewise/GenericPieces.cpp
-- piecewise/GenericPiecesTest.cpp
- piecewise/RequestRange.cpp
-- piecewise/RequestRangeTest.cpp
- Serialization.cpp
-- TestUtils.cpp
- Utils.cpp
- )
- add_dependencies(cachelib_common thrift_generated_files)
-@@ -51,7 +47,12 @@
-
-
- if (BUILD_TESTS)
-- add_library (common_test_support INTERFACE)
-+ add_library (common_test_support INTERFACE
-+ TestUtils.cpp
-+ hothash/HotHashDetectorTest.cpp
-+ piecewise/GenericPiecesTest.cpp
-+ piecewise/RequestRangeTest.cpp
-+ )
- target_link_libraries (common_test_support INTERFACE
- cachelib_common
- gflags
diff --git a/cachelib-undo-thrift-codemod.patch b/cachelib-undo-thrift-codemod.patch
new file mode 100644
index 0000000..f636a24
--- /dev/null
+++ b/cachelib-undo-thrift-codemod.patch
@@ -0,0 +1,412 @@
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/CacheAllocator-inl.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/CacheAllocator-inl.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/CacheAllocator-inl.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/CacheAllocator-inl.h 2022-02-28
10:59:44.769907918 -0800
+@@ -3163,22 +3163,22 @@
+ // TODO:
+ // Once everyone is on v8 or later, remove the outter if.
+ if (kCachelibVersion > 8) {
+- if (*meta.ramFormatVersion() != kCacheRamFormatVersion) {
++ if (*meta.ramFormatVersion_ref() != kCacheRamFormatVersion) {
+ throw std::runtime_error(
+ folly::sformat("Expected cache ram format version {}. But found
{}.",
+- kCacheRamFormatVersion, *meta.ramFormatVersion()));
++ kCacheRamFormatVersion, *meta.ramFormatVersion_ref()));
+ }
+ }
+
+- if (*meta.accessType() != AccessType::kId) {
++ if (*meta.accessType_ref() != AccessType::kId) {
+ throw std::invalid_argument(
+- folly::sformat("Expected {}, got {} for AccessType",
*meta.accessType(),
+- AccessType::kId));
++ folly::sformat("Expected {}, got {} for AccessType",
++ *meta.accessType_ref(), AccessType::kId));
+ }
+
+- if (*meta.mmType() != MMType::kId) {
+- throw std::invalid_argument(folly::sformat("Expected {}, got {} for
MMType",
+- *meta.mmType(), MMType::kId));
++ if (*meta.mmType_ref() != MMType::kId) {
++ throw std::invalid_argument(folly::sformat(
++ "Expected {}, got {} for MMType", *meta.mmType_ref(), MMType::kId));
+ }
+ return meta;
+ }
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/ChainedHashTable-inl.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/ChainedHashTable-inl.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/ChainedHashTable-inl.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/ChainedHashTable-inl.h 2022-02-28
10:59:44.777907960 -0800
+@@ -241,12 +241,12 @@
+ ht_{config_.getNumBuckets(), memStart, compressor, config_.getHasher(),
+ false /* resetMem */},
+ locks_{config_.getLocksPower(), config_.getHasher()},
+- numKeys_(*object.numKeys()) {
++ numKeys_(*object.numKeys_ref()) {
+ if (config_.getBucketsPower() !=
+- static_cast<uint32_t>(*object.bucketsPower())) {
++ static_cast<uint32_t>(*object.bucketsPower_ref())) {
+ throw std::invalid_argument(folly::sformat(
+ "Hashtable bucket power not compatible. old = {}, new = {}",
+- *object.bucketsPower(),
++ *object.bucketsPower_ref(),
+ config.getBucketsPower()));
+ }
+
+@@ -260,11 +260,11 @@
+ // checking hasher magic id not equal to 0 is to ensure it'll be
+ // a warm roll going from a cachelib without hasher magic id to
+ // one with a magic id
+- if (*object.hasherMagicId() != 0 &&
+- *object.hasherMagicId() != config_.getHasher()->getMagicId()) {
++ if (*object.hasherMagicId_ref() != 0 &&
++ *object.hasherMagicId_ref() != config_.getHasher()->getMagicId()) {
+ throw std::invalid_argument(folly::sformat(
+ "Hash object's ID mismatch. expected = {}, actual = {}",
+- *object.hasherMagicId(), config_.getHasher()->getMagicId()));
++ *object.hasherMagicId_ref(), config_.getHasher()->getMagicId()));
+ }
+ }
+
+@@ -476,10 +476,10 @@
+ }
+
+ serialization::ChainedHashTableObject object;
+- *object.bucketsPower() = config_.getBucketsPower();
+- *object.locksPower() = config_.getLocksPower();
+- *object.numKeys() = numKeys_;
+- *object.hasherMagicId() = config_.getHasher()->getMagicId();
++ *object.bucketsPower_ref() = config_.getBucketsPower();
++ *object.locksPower_ref() = config_.getLocksPower();
++ *object.numKeys_ref() = numKeys_;
++ *object.hasherMagicId_ref() = config_.getHasher()->getMagicId();
+ return object;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/DList.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/DList.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/DList.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/DList.h 2022-02-28
10:59:44.777907960 -0800
+@@ -94,18 +94,20 @@
+ // @param compressor PtrCompressor object
+ DList(const DListObject& object, PtrCompressor compressor)
+ : compressor_(std::move(compressor)),
+- head_(compressor_.unCompress(CompressedPtr{*object.compressedHead()})),
+- tail_(compressor_.unCompress(CompressedPtr{*object.compressedTail()})),
+- size_(*object.size()) {}
++ head_(compressor_.unCompress(
++ CompressedPtr{*object.compressedHead_ref()})),
++ tail_(compressor_.unCompress(
++ CompressedPtr{*object.compressedTail_ref()})),
++ size_(*object.size_ref()) {}
+
+ /**
+ * Exports the current state as a thrift object for later restoration.
+ */
+ DListObject saveState() const {
+ DListObject state;
+- *state.compressedHead() = compressor_.compress(head_).saveState();
+- *state.compressedTail() = compressor_.compress(tail_).saveState();
+- *state.size() = size_;
++ *state.compressedHead_ref() = compressor_.compress(head_).saveState();
++ *state.compressedTail_ref() = compressor_.compress(tail_).saveState();
++ *state.size_ref() = size_;
+ return state;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/MultiDList.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/MultiDList.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/MultiDList.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/MultiDList.h 2022-02-28
10:59:44.777907960 -0800
+@@ -58,7 +58,7 @@
+ // @param object saved MultiDList object
+ // @param compressor PtrCompressor object
+ MultiDList(const MultiDListObject& object, PtrCompressor compressor) {
+- for (const auto& list : *object.lists()) {
++ for (const auto& list : *object.lists_ref()) {
+ lists_.emplace_back(std::make_unique<SingleDList>(list, compressor));
+ }
+ }
+@@ -69,7 +69,7 @@
+ MultiDListObject saveState() const {
+ MultiDListObject state;
+ for (const auto& listPtr : lists_) {
+- state.lists()->emplace_back(listPtr->saveState());
++ state.lists_ref()->emplace_back(listPtr->saveState());
+ }
+ return state;
+ }
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/SList.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/SList.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/datastruct/SList.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/datastruct/SList.h 2022-02-28
10:59:44.777907960 -0800
+@@ -85,12 +85,14 @@
+
+ explicit SList(const SListObject& object, PtrCompressor compressor)
+ : compressor_(std::move(compressor)),
+- size_(*object.size()),
+- head_(compressor_.unCompress(CompressedPtr{*object.compressedHead()})) {
++ size_(*object.size_ref()),
++ head_(compressor_.unCompress(
++ CompressedPtr{*object.compressedHead_ref()})) {
+ // TODO(bwatling): eventually we'll always have 'compressedTail' and we
can
+ // remove the loop below.
+- if (*object.compressedTail() >= 0) {
+- tail_ = compressor_.unCompress(CompressedPtr{*object.compressedTail()});
++ if (*object.compressedTail_ref() >= 0) {
++ tail_ =
++ compressor_.unCompress(CompressedPtr{*object.compressedTail_ref()});
+ } else if (head_) {
+ tail_ = head_;
+ while (T* next = getNext(*tail_)) {
+@@ -106,9 +108,9 @@
+ */
+ SListObject saveState() const {
+ SListObject state;
+- *state.compressedHead() = compressor_.compress(head_).saveState();
+- *state.compressedTail() = compressor_.compress(tail_).saveState();
+- *state.size() = size_;
++ *state.compressedHead_ref() = compressor_.compress(head_).saveState();
++ *state.compressedTail_ref() = compressor_.compress(tail_).saveState();
++ *state.size_ref() = size_;
+ return state;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MM2Q.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MM2Q.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MM2Q.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MM2Q.h 2022-02-28
10:59:44.777907960 -0800
+@@ -71,14 +71,14 @@
+ struct Config {
+ // Create from serialized config
+ explicit Config(SerializationConfigType configState)
+- : Config(*configState.lruRefreshTime(),
+- *configState.lruRefreshRatio(),
+- *configState.updateOnWrite(),
+- *configState.updateOnRead(),
+- *configState.tryLockUpdate(),
+- *configState.rebalanceOnRecordAccess(),
+- *configState.hotSizePercent(),
+- *configState.coldSizePercent()) {}
++ : Config(*configState.lruRefreshTime_ref(),
++ *configState.lruRefreshRatio_ref(),
++ *configState.updateOnWrite_ref(),
++ *configState.updateOnRead_ref(),
++ *configState.tryLockUpdate_ref(),
++ *configState.rebalanceOnRecordAccess_ref(),
++ *configState.hotSizePercent_ref(),
++ *configState.coldSizePercent_ref()) {}
+
+ // @param time the refresh time in seconds to trigger an update in
+ // position upon access. An item will be promoted only once in each lru
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MM2Q-inl.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MM2Q-inl.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MM2Q-inl.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MM2Q-inl.h 2022-02-28
10:59:44.777907960 -0800
+@@ -21,9 +21,9 @@
+ template <typename T, MM2Q::Hook<T> T::*HookPtr>
+ MM2Q::Container<T, HookPtr>::Container(const serialization::MM2QObject&
object,
+ PtrCompressor compressor)
+- : lru_(*object.lrus(), compressor),
+- tailTrackingEnabled_(*object.tailTrackingEnabled()),
+- config_(*object.config()) {
++ : lru_(*object.lrus_ref(), compressor),
++ tailTrackingEnabled_(*object.tailTrackingEnabled_ref()),
++ config_(*object.config_ref()) {
+ lruRefreshTime_ = config_.lruRefreshTime;
+ nextReconfigureTime_ = config_.mmReconfigureIntervalSecs.count() == 0
+ ? std::numeric_limits<Time>::max()
+@@ -32,9 +32,9 @@
+
+ // We need to adjust list positions if the previous version does not have
+ // tail lists (WarmTail & ColdTail), in order to potentially avoid cold roll
+- if (object.lrus()->lists()->size() < LruType::NumTypes) {
++ if (object.lrus_ref()->lists_ref()->size() < LruType::NumTypes) {
+ XDCHECK_EQ(false, tailTrackingEnabled_);
+- XDCHECK_EQ(object.lrus()->lists()->size() + 2, LruType::NumTypes);
++ XDCHECK_EQ(object.lrus_ref()->lists_ref()->size() + 2, LruType::NumTypes);
+ lru_.insertEmptyListAt(LruType::WarmTail, compressor);
+ lru_.insertEmptyListAt(LruType::ColdTail, compressor);
+ }
+@@ -380,18 +380,18 @@
+ serialization::MM2QObject MM2Q::Container<T, HookPtr>::saveState()
+ const noexcept {
+ serialization::MM2QConfig configObject;
+- *configObject.lruRefreshTime() = lruRefreshTime_;
+- *configObject.lruRefreshRatio() = config_.lruRefreshRatio;
+- *configObject.updateOnWrite() = config_.updateOnWrite;
+- *configObject.updateOnRead() = config_.updateOnRead;
+- *configObject.hotSizePercent() = config_.hotSizePercent;
+- *configObject.coldSizePercent() = config_.coldSizePercent;
+- *configObject.rebalanceOnRecordAccess() = config_.rebalanceOnRecordAccess;
++ *configObject.lruRefreshTime_ref() = lruRefreshTime_;
++ *configObject.lruRefreshRatio_ref() = config_.lruRefreshRatio;
++ *configObject.updateOnWrite_ref() = config_.updateOnWrite;
++ *configObject.updateOnRead_ref() = config_.updateOnRead;
++ *configObject.hotSizePercent_ref() = config_.hotSizePercent;
++ *configObject.coldSizePercent_ref() = config_.coldSizePercent;
++ *configObject.rebalanceOnRecordAccess_ref() = config_.rebalanceOnRecordAccess;
+
+ serialization::MM2QObject object;
+- *object.config() = configObject;
+- *object.tailTrackingEnabled() = tailTrackingEnabled_;
+- *object.lrus() = lru_.saveState();
++ *object.config_ref() = configObject;
++ *object.tailTrackingEnabled_ref() = tailTrackingEnabled_;
++ *object.lrus_ref() = lru_.saveState();
+ return object;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMLru.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMLru.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMLru.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMLru.h 2022-02-28
10:59:44.777907960 -0800
+@@ -67,12 +67,13 @@
+ struct Config {
+ // create from serialized config
+ explicit Config(SerializationConfigType configState)
+- : Config(*configState.lruRefreshTime(),
+- *configState.lruRefreshRatio(),
+- *configState.updateOnWrite(),
+- *configState.updateOnRead(),
+- *configState.tryLockUpdate(),
+- static_cast<uint8_t>(*configState.lruInsertionPointSpec())) {}
++ : Config(
++ *configState.lruRefreshTime_ref(),
++ *configState.lruRefreshRatio_ref(),
++ *configState.updateOnWrite_ref(),
++ *configState.updateOnRead_ref(),
++ *configState.tryLockUpdate_ref(),
++ static_cast<uint8_t>(*configState.lruInsertionPointSpec_ref())) {}
+
+ // @param time the LRU refresh time in seconds.
+ // An item will be promoted only once in each lru refresh
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMLru-inl.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMLru-inl.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMLru-inl.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMLru-inl.h 2022-02-28
10:59:44.777907960 -0800
+@@ -28,11 +28,11 @@
+ MMLru::Container<T, HookPtr>::Container(serialization::MMLruObject object,
+ PtrCompressor compressor)
+ : compressor_(std::move(compressor)),
+- lru_(*object.lru(), compressor_),
++ lru_(*object.lru_ref(), compressor_),
+ insertionPoint_(compressor_.unCompress(
+- CompressedPtr{*object.compressedInsertionPoint()})),
+- tailSize_(*object.tailSize()),
+- config_(*object.config()) {
++ CompressedPtr{*object.compressedInsertionPoint_ref()})),
++ tailSize_(*object.tailSize_ref()),
++ config_(*object.config_ref()) {
+ lruRefreshTime_ = config_.lruRefreshTime;
+ nextReconfigureTime_ = config_.mmReconfigureIntervalSecs.count() == 0
+ ? std::numeric_limits<Time>::max()
+@@ -307,20 +307,20 @@
+ serialization::MMLruObject MMLru::Container<T, HookPtr>::saveState()
+ const noexcept {
+ serialization::MMLruConfig configObject;
+- *configObject.lruRefreshTime() =
++ *configObject.lruRefreshTime_ref() =
+ lruRefreshTime_.load(std::memory_order_relaxed);
+- *configObject.lruRefreshRatio() = config_.lruRefreshRatio;
+- *configObject.updateOnWrite() = config_.updateOnWrite;
+- *configObject.updateOnRead() = config_.updateOnRead;
+- *configObject.tryLockUpdate() = config_.tryLockUpdate;
+- *configObject.lruInsertionPointSpec() = config_.lruInsertionPointSpec;
++ *configObject.lruRefreshRatio_ref() = config_.lruRefreshRatio;
++ *configObject.updateOnWrite_ref() = config_.updateOnWrite;
++ *configObject.updateOnRead_ref() = config_.updateOnRead;
++ *configObject.tryLockUpdate_ref() = config_.tryLockUpdate;
++ *configObject.lruInsertionPointSpec_ref() = config_.lruInsertionPointSpec;
+
+ serialization::MMLruObject object;
+- *object.config() = configObject;
+- *object.compressedInsertionPoint() =
++ *object.config_ref() = configObject;
++ *object.compressedInsertionPoint_ref() =
+ compressor_.compress(insertionPoint_).saveState();
+- *object.tailSize() = tailSize_;
+- *object.lru() = lru_.saveState();
++ *object.tailSize_ref() = tailSize_;
++ *object.lru_ref() = lru_.saveState();
+ return object;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMTinyLFU.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMTinyLFU.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMTinyLFU.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMTinyLFU.h 2022-02-28
10:59:44.777907960 -0800
+@@ -80,13 +80,13 @@
+ struct Config {
+ // create from serialized config
+ explicit Config(SerializationConfigType configState)
+- : Config(*configState.lruRefreshTime(),
+- *configState.lruRefreshRatio(),
+- *configState.updateOnWrite(),
+- *configState.updateOnRead(),
+- *configState.tryLockUpdate(),
+- *configState.windowToCacheSizeRatio(),
+- *configState.tinySizePercent()) {}
++ : Config(*configState.lruRefreshTime_ref(),
++ *configState.lruRefreshRatio_ref(),
++ *configState.updateOnWrite_ref(),
++ *configState.updateOnRead_ref(),
++ *configState.tryLockUpdate_ref(),
++ *configState.windowToCacheSizeRatio_ref(),
++ *configState.tinySizePercent_ref()) {}
+
+ // @param time the LRU refresh time in seconds.
+ // An item will be promoted only once in each lru refresh
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMTinyLFU-inl.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMTinyLFU-inl.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/allocator/MMTinyLFU-inl.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/allocator/MMTinyLFU-inl.h 2022-02-28
10:59:44.777907960 -0800
+@@ -21,7 +21,8 @@
+ template <typename T, MMTinyLFU::Hook<T> T::*HookPtr>
+ MMTinyLFU::Container<T, HookPtr>::Container(
+ serialization::MMTinyLFUObject object, PtrCompressor compressor)
+- : lru_(*object.lrus(), std::move(compressor)), config_(*object.config()) {
++ : lru_(*object.lrus_ref(), std::move(compressor)),
++ config_(*object.config_ref()) {
+ lruRefreshTime_ = config_.lruRefreshTime;
+ nextReconfigureTime_ = config_.mmReconfigureIntervalSecs.count() == 0
+ ? std::numeric_limits<Time>::max()
+@@ -300,18 +301,18 @@
+ serialization::MMTinyLFUObject MMTinyLFU::Container<T, HookPtr>::saveState()
+ const noexcept {
+ serialization::MMTinyLFUConfig configObject;
+- *configObject.lruRefreshTime() =
++ *configObject.lruRefreshTime_ref() =
+ lruRefreshTime_.load(std::memory_order_relaxed);
+- *configObject.lruRefreshRatio() = config_.lruRefreshRatio;
+- *configObject.updateOnWrite() = config_.updateOnWrite;
+- *configObject.updateOnRead() = config_.updateOnRead;
+- *configObject.windowToCacheSizeRatio() = config_.windowToCacheSizeRatio;
+- *configObject.tinySizePercent() = config_.tinySizePercent;
++ *configObject.lruRefreshRatio_ref() = config_.lruRefreshRatio;
++ *configObject.updateOnWrite_ref() = config_.updateOnWrite;
++ *configObject.updateOnRead_ref() = config_.updateOnRead;
++ *configObject.windowToCacheSizeRatio_ref() = config_.windowToCacheSizeRatio;
++ *configObject.tinySizePercent_ref() = config_.tinySizePercent;
+ // TODO: May be save/restore the counters.
+
+ serialization::MMTinyLFUObject object;
+- *object.config() = configObject;
+- *object.lrus() = lru_.saveState();
++ *object.config_ref() = configObject;
++ *object.lrus_ref() = lru_.saveState();
+ return object;
+ }
+
+diff '--color=auto' -ruN
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/compact_cache/allocators/CCacheAllocatorBase.h
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/compact_cache/allocators/CCacheAllocatorBase.h
+---
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85/cachelib/compact_cache/allocators/CCacheAllocatorBase.h 2022-02-28
10:07:30.000000000 -0800
++++
CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85-undo-thrift-codemod/cachelib/compact_cache/allocators/CCacheAllocatorBase.h 2022-02-28
10:59:44.777907960 -0800
+@@ -44,7 +44,7 @@
+ CCacheMetadata() : keySize_(0), valueSize_(0) {}
+
+ CCacheMetadata(const SerializationType& object)
+- : keySize_(*object.keySize()), valueSize_(*object.valueSize()) {}
++ : keySize_(*object.keySize_ref()), valueSize_(*object.valueSize_ref()) {}
+
+ template <typename CCacheT>
+ void initializeOrVerify() {
+@@ -65,8 +65,8 @@
+
+ SerializationType saveState() {
+ SerializationType object;
+- *object.keySize() = keySize_;
+- *object.valueSize() = valueSize_;
++ *object.keySize_ref() = keySize_;
++ *object.valueSize_ref() = valueSize_;
+ return object;
+ }
+
diff --git a/cachelib-versioned_so.patch b/cachelib-versioned_so.patch
deleted file mode 100644
index 496ea32..0000000
--- a/cachelib-versioned_so.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -ruN CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/CMakeLists.txt
CacheLib-versioned_so/cachelib/CMakeLists.txt
---- CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
-+++ CacheLib-versioned_so/cachelib/CMakeLists.txt 2021-12-22 14:22:35.444840967 -0800
-@@ -24,14 +24,18 @@
-
- #configure_file(cachelib/cachelib_config.h.in cachelib_config.h)
-
--set(CACHELIB_MAJOR_VERSION 0)
-+if (NOT DEFINED CACHELIB_MAJOR_VERSION)
-+ set(CACHELIB_MAJOR_VERSION 0)
-+endif ()
- set(CACHELIB_MINOR_VERSION 1)
- set(CACHELIB_PATCH_VERSION 0)
- set(CACHELIB_VERSION
- ${CACHELIB_MAJOR_VERSION}.${CACHELIB_MINOR_VERSION}.${CACHELIB_PATCH_VERSION})
-
- set(PACKAGE_NAME "cachelib")
--set(PACKAGE_VERSION "${CACHELIB_VERSION}")
-+if (NOT DEFINED PACKAGE_VERSION)
-+ set(PACKAGE_VERSION "${CACHELIB_VERSION}")
-+endif ()
- set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
- set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
- set(PACKAGE_BUGREPORT "https://github.com/facebook/TBD")
-@@ -361,6 +365,20 @@
- #NAMESPACE cachelib::
- DESTINATION ${CMAKE_INSTALL_DIR})
-
-+if (BUILD_SHARED_LIBS)
-+ set_target_properties(
-+ cachelib_allocator
-+ cachelib_cachebench
-+ cachelib_common
-+ cachelib_datatype
-+ cachelib_navy
-+ cachelib_shm
-+ PROPERTIES
-+ SOVERSION ${CACHELIB_MAJOR_VERSION}
-+ VERSION ${PACKAGE_VERSION}
-+ )
-+endif ()
-+
- if (BUILD_TESTS)
- get_property(TEST_BINARIES GLOBAL PROPERTY TEST_BINARIES)
- #message(STATUS "=== Test binaries : ${TEST_BINARIES} ===")
commit 6a43db44e46038c5d76856f6e0eae551241f0b7f
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Feb 28 11:01:49 2022 -0800
Update to snapshot from 20220228; use new-style versioning
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index c7443b2..ad2fa97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8.tar.gz
+/CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz
diff --git a/cachelib.spec b/cachelib.spec
index fd2cd66..d404dbe 100644
--- a/cachelib.spec
+++ b/cachelib.spec
@@ -6,9 +6,12 @@
%bcond_with tests
%global forgeurl
https://github.com/facebook/CacheLib
-%global commit c4904ef2524f396eb432392f8308a69dda926bd8
+%global commit 03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global date 20211220
+%global date 20220228
+# disable forge macro snapinfo generation
+#
https://pagure.io/fedora-infra/rpmautospec/issue/240
+%global distprefix %{nil}
%forgemeta
# see cachelib/allocator/CacheVersion.h's kCachelibVersion
@@ -16,23 +19,18 @@
Name: cachelib
-Version: %{major_ver}
-# using -s seems to add the snapinfo twice in the generated filename
-#
https://pagure.io/fedora-infra/rpmautospec/issue/240
-Release: %autorelease -e %{date}git%{shortcommit}
+Version: %{major_ver}^%{date}git%{shortcommit}
+Release: %autorelease
Summary: Pluggable caching engine for scale high performance cache services
License: ASL 2.0
URL: %forgeurl
Source0: %forgesource
-# move TestUtils from cachelib_common to common_test_support to avoid ld issues
-Patch0: %{name}-ld_gtest.patch
-# need to install cachelib_cachebench when building shared libs
-Patch1: %{name}-install_cachebench_so.patch
-# and version them
-Patch2: %{name}-versioned_so.patch
+# cachelib builds broken by recent thrift codemod
+Patch0: %{name}-undo-thrift-codemod.patch
# needed on EL8; its gtest does not come with cmake files
-Patch3: %{name}-find-gtest.patch
+Patch1: %{name}-find-gtest.patch
+
# Folly is known not to work on big-endian CPUs
#
https://bugzilla.redhat.com/show_bug.cgi?id=1892151
@@ -90,10 +88,8 @@ applications that use %{name}.
%prep
%forgesetup
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
%if 0%{?el8}
-%patch3 -p1
+%patch1 -p1
%endif
diff --git a/sources b/sources
index 6428f23..838f6d4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8.tar.gz) =
6ce0a8783bd88d1b4673832cad5305971fe92dadb4f8a1423eaf5828e97c3b0f0100a70bdf97e476d66e3824d8e3841e7d971979aa8c57b8fa2b357870dd96cc
+SHA512 (CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz) =
5450820657ef531d6bf375d44d9bfa31c6d27dc42bb92faf594cebc2fe63f9130dfa2a02a7e7a3e5e34544a3446bdf2f6675c825439ed13ed91f04bf5c368e04
commit c746c7083be849a351073a024af30a488d6e076f
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Thu Feb 24 19:33:14 2022 -0800
Fix for finding gtest on EL8; exclude aarch64 instead of %%arm64
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/cachelib-find-gtest.patch b/cachelib-find-gtest.patch
new file mode 100644
index 0000000..b9cce71
--- /dev/null
+++ b/cachelib-find-gtest.patch
@@ -0,0 +1,70 @@
+diff '--color=auto' -ruN
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/cmake/FindGTest.cmake
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/cmake/FindGTest.cmake
+---
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/cmake/FindGTest.cmake 1969-12-31
16:00:00.000000000 -0800
++++
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/cmake/FindGTest.cmake 2022-02-24
20:08:51.087790319 -0800
+@@ -0,0 +1,54 @@
++# Copyright (c) Facebook, Inc. and its affiliates.
++#
++# Licensed under the Apache License, Version 2.0 (the "License");
++# you may not use this file except in compliance with the License.
++# You may obtain a copy of the License at
++#
++#
http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++
++# Find GTest
++#
++# This will define:
++# GTEST_FOUND
++# GTEST_INCLUDE_DIRS
++# GTEST_LIBRARIES
++# GTEST_MAIN_LIBRARIES
++# GTEST_BOTH_LIBRARIES
++
++find_path(GTEST_INCLUDE_DIRS gtest/gtest.h
++ HINTS
++ $ENV{GTEST_ROOT}/include
++ ${GTEST_ROOT}/include
++)
++
++find_library(GTEST_LIBRARIES
++ NAMES gtest
++ HINTS
++ $ENV{GTEST_ROOT}
++ ${GTEST_ROOT}
++)
++
++find_library(GTEST_MAIN_LIBRARIES
++ NAMES gtest_main
++ HINTS
++ $ENV{GTEST_ROOT}
++ ${GTEST_ROOT}
++)
++
++set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
++
++mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(
++ GTest GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
++
++if(GTEST_FOUND AND NOT GTEST_FIND_QUIETLY)
++ message(STATUS "GTEST: ${GTEST_INCLUDE_DIRS}")
++endif()
+diff '--color=auto' -ruN
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/CMakeLists.txt
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/CMakeLists.txt
+--- CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/CMakeLists.txt 2021-12-20
07:22:18.000000000 -0800
++++
CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/CMakeLists.txt 2022-02-24
20:12:39.078602510 -0800
+@@ -93,7 +93,7 @@
+ system filesystem regex context program_options thread)
+ find_package(Gflags REQUIRED)
+ find_package(Glog REQUIRED)
+-find_package(GTest CONFIG REQUIRED)
++find_package(GTest REQUIRED)
+ find_package(folly CONFIG REQUIRED)
+ find_package(fizz CONFIG REQUIRED)
+ find_package(fmt CONFIG REQUIRED)
diff --git a/cachelib.spec b/cachelib.spec
index 449dfcb..fd2cd66 100644
--- a/cachelib.spec
+++ b/cachelib.spec
@@ -31,6 +31,8 @@ Patch0: %{name}-ld_gtest.patch
Patch1: %{name}-install_cachebench_so.patch
# and version them
Patch2: %{name}-versioned_so.patch
+# needed on EL8; its gtest does not come with cmake files
+Patch3: %{name}-find-gtest.patch
# Folly is known not to work on big-endian CPUs
#
https://bugzilla.redhat.com/show_bug.cgi?id=1892151
@@ -45,7 +47,7 @@ ExcludeArch: %{arm32}
ExcludeArch: %{ix86}
# build failure on aarch64
#
https://bugzilla.redhat.com/show_bug.cgi?id=2036121
-ExcludeArch: %{arm64}
+ExcludeArch: aarch64
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -86,7 +88,13 @@ applications that use %{name}.
%prep
-%forgeautosetup -p1
+%forgesetup
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%if 0%{?el8}
+%patch3 -p1
+%endif
%build
commit 63963821d9e9afe8d39fe7eea2bfcd33bc0175d4
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Wed Jan 19 22:47:24 2022 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>