public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Alexandre Salim <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/cachelib] epel10.3: Update to snapshot from 20220314; remove patch working around thrift issue; enable aarch64 (resolves: rhbz#2036121); build tests
Date: Thu, 08 Oct 2026 09:23:10 GMT	[thread overview]
Message-ID: <179145139095.1.13881316856210422633.rpms-cachelib-60975319fcf0@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/cachelib
            Branch : epel10.3
            Commit : 60975319fcf0308e9d0f47febb09639883a51aed
            Author : Michel Alexandre Salim <salimma@fedoraproject.org>
            Date   : 2022-03-15T14:01:55-07:00
            Stats  : +78/-433 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/cachelib/c/60975319fcf0308e9d0f47febb09639883a51aed?branch=epel10.3

            Log:
            Update to snapshot from 20220314; remove patch working around thrift issue; enable aarch64 (resolves: rhbz#2036121); build tests

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>

---
diff --git a/.gitignore b/.gitignore
index ad2fa97..efd78cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz
+/CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz

diff --git a/cachelib-fix_test_linking.patch b/cachelib-fix_test_linking.patch
new file mode 100644
index 0000000..fd9df62
--- /dev/null
+++ b/cachelib-fix_test_linking.patch
@@ -0,0 +1,61 @@
+diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/allocator/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/allocator/CMakeLists.txt
+--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/allocator/CMakeLists.txt	2022-03-14 10:49:38.000000000 -0700
++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/allocator/CMakeLists.txt	2022-03-15 14:00:37.874691691 -0700
+@@ -77,7 +77,8 @@
+         DESTINATION ${LIB_INSTALL_DIR} )
+ 
+ if (BUILD_TESTS)
+-  add_library (allocator_test_support
++  add_library (allocator_test_support OBJECT
++    ../common/TestUtils.cpp
+     ${DATASTRUCT_TESTS_THRIFT_FILES}
+     ./nvmcache/tests/NvmTestBase.cpp
+     ./memory/tests/TestBase.cpp
+diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/benchmarks/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/benchmarks/CMakeLists.txt
+--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/benchmarks/CMakeLists.txt	2022-03-14 10:49:38.000000000 -0700
++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/benchmarks/CMakeLists.txt	2022-03-15 13:21:46.885003006 -0700
+@@ -44,7 +44,7 @@
+   add_test (CachelibTickerClockBench.cpp)
+   add_test (CompactCacheBench.cpp)
+   add_test (HashMapBenchmark.cpp)
+-  add_test (ItemsReaperBench.cpp)
++  add_test (ItemsReaperBench.cpp allocator_test_support)
+   add_test (tl-bench/main.cpp)
+   add_test (MMTypeAccessBench.cpp)
+   add_test (MMTypeBench.cpp)
+diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/common/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/common/CMakeLists.txt
+--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/common/CMakeLists.txt	2022-03-14 10:49:38.000000000 -0700
++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/common/CMakeLists.txt	2022-03-15 12:15:28.818925017 -0700
+@@ -76,12 +76,12 @@
+   add_test (tests/CohortTests.cpp)
+   add_test (tests/CounterTests.cpp)
+   add_test (tests/CountMinSketchTest.cpp)
+-  add_test (tests/EventInterfaceTest.cpp cachelib_allocator)
++  add_test (tests/EventInterfaceTest.cpp allocator_test_support)
+   add_test (tests/HashTests.cpp)
+   add_test (tests/IteratorsTests.cpp)
+   add_test (tests/MutexTests.cpp)
+   add_test (tests/PeriodicWorkerTest.cpp)
+-  add_test (tests/SerializationTest.cpp cachelib_allocator)
++  add_test (tests/SerializationTest.cpp allocator_test_support)
+   add_test (tests/UtilTests.cpp)
+   add_test (tests/CountDownLatchTest.cpp)
+   add_test (tests/UtilTestsRSS.cpp)
+diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/compact_cache/CMakeLists.txt
+--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CMakeLists.txt	2022-03-14 10:49:38.000000000 -0700
++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/compact_cache/CMakeLists.txt	2022-03-15 11:33:00.611186014 -0700
+@@ -12,11 +12,10 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ 
+-add_library (compact_cache_test_support INTERFACE)
+-add_dependencies(compact_cache_test_support INTERFACE thrift_generated_files)
+-
+ if (BUILD_TESTS)
+-  target_link_libraries (compact_cache_test_support INTERFACE
++  add_library (compact_cache_test_support OBJECT ../common/TestUtils.cpp)
++
++  target_link_libraries (compact_cache_test_support PUBLIC
+     cachelib_allocator
+     glog::glog
+     gflags

diff --git a/cachelib-undo-thrift-codemod.patch b/cachelib-undo-thrift-codemod.patch
deleted file mode 100644
index f636a24..0000000
--- a/cachelib-undo-thrift-codemod.patch
+++ /dev/null
@@ -1,412 +0,0 @@
-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.spec b/cachelib.spec
index 9d976e6..e9cf337 100644
--- a/cachelib.spec
+++ b/cachelib.spec
@@ -9,17 +9,14 @@
 %global toolchain clang
 %endif
 
-# Tests currently fail with
-# /builddir/build/BUILD/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/compact_cache/tests/CCacheTests.cpp:159:1:   required from here
-# /builddir/build/BUILD/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/../cachelib/compact_cache/CCacheFixedLruBucket.h:277:11: internal compiler error: Floating point exception
-# 277 |     memcpy(destPtr, srcPtr, sizeof(T));
-#     |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
-%bcond_with tests
+%bcond_without build_tests
+# tests not discoverable by ctest yet
+%bcond_with check
 
 %global forgeurl https://github.com/facebook/CacheLib
-%global commit 03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85
+%global commit bd22b0eb79f7e2326f77a22c278c48e454882291
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global date 20220228
+%global date 20220314
 # disable forge macro snapinfo generation
 # https://pagure.io/fedora-infra/rpmautospec/issue/240
 %global distprefix %{nil}
@@ -28,7 +25,6 @@
 # see cachelib/allocator/CacheVersion.h's kCachelibVersion
 %global major_ver 16
 
-
 Name:           cachelib
 Version:        %{major_ver}^%{date}git%{shortcommit}
 Release:        %autorelease
@@ -37,11 +33,9 @@ Summary:        Pluggable caching engine for scale high performance cache servic
 License:        ASL 2.0
 URL:            %forgeurl
 Source0:        %forgesource
-# cachelib builds broken by recent thrift codemod
-Patch0:         %{name}-undo-thrift-codemod.patch
+Patch0:         %{name}-fix_test_linking.patch
 # needed on EL8; its gtest does not come with cmake files
-Patch1:         %{name}-find-gtest.patch
-
+Patch100:       %{name}-find-gtest.patch
 
 # Folly is known not to work on big-endian CPUs
 # https://bugzilla.redhat.com/show_bug.cgi?id=1892151
@@ -58,9 +52,6 @@ ExcludeArch:    %{arm}
 ExcludeArch:    %{arm32}
 %endif
 ExcludeArch:    %{ix86}
-# build failure on aarch64
-# https://bugzilla.redhat.com/show_bug.cgi?id=2036121
-ExcludeArch:    aarch64
 
 BuildRequires:  cmake
 %if %{with toolchain_clang}
@@ -71,7 +62,7 @@ BuildRequires:  gcc-c++
 BuildRequires:  fbthrift-devel
 BuildRequires:  fizz-devel
 BuildRequires:  folly-devel
-%if %{with tests}
+%if %{with build_tests}
 BuildRequires:  gmock-devel
 %endif
 # this is actually needed, because of
@@ -108,14 +99,14 @@ applications that use %{name}.
 %forgesetup
 %patch0 -p1
 %if 0%{?el8}
-%patch1 -p1
+%patch100 -p1
 %endif
 
 
 %build
 pushd %{name}
 %cmake \
-%if %{with tests}
+%if %{with build_tests}
   -DBUILD_TESTS:BOOL=ON \
 %else
   -DBUILD_TESTS:BOOL=OFF \
@@ -132,9 +123,13 @@ pushd %{name}
 %install
 pushd %{name}
 %cmake_install
+%if %{with build_tests}
+# TODO: prevent tests being installed
+rm -rf %{buildroot}%{_prefix}/tests
+%endif
 
 
-%if %{with tests}
+%if %{with check}
 %check
 pushd %{name}
 %ctest

diff --git a/sources b/sources
index 838f6d4..9425ec2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz) = 5450820657ef531d6bf375d44d9bfa31c6d27dc42bb92faf594cebc2fe63f9130dfa2a02a7e7a3e5e34544a3446bdf2f6675c825439ed13ed91f04bf5c368e04
+SHA512 (CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz) = 38643e57c51047abf9888b4442c305cf9de9c42bd1560cdb68edabd10158ce9d904eb1bdef546228e3818679135d6d6147c3b2d4c021ea0ad177f53f9f215305

                 reply	other threads:[~2026-10-08  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179145139095.1.13881316856210422633.rpms-cachelib-60975319fcf0@fedoraproject.org \
    --to=salimma@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox