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: Add new patch and retire old merged patches
Date: Thu, 08 Oct 2026 08:26:01 GMT	[thread overview]
Message-ID: <179144796127.1.3888612748305321706.rpms-cachelib-4913bb557a7d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/cachelib
            Branch : epel10
            Commit : 4913bb557a7d07dae467a6d62626f0de9939aa2b
            Author : Michel Alexandre Salim <salimma@fedoraproject.org>
            Date   : 2022-02-28T12:08:06-08:00
            Stats  : +412/-97 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/cachelib/c/4913bb557a7d07dae467a6d62626f0de9939aa2b?branch=epel10

            Log:
            Add new patch and retire old merged patches

Signed-off-by: Michel Alexandre Salim <salimma@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} ===")

                 reply	other threads:[~2026-10-08  8:26 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=179144796127.1.3888612748305321706.rpms-cachelib-4913bb557a7d@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