From e5f159485648a6d52f19d47e799c924eeb787fe8 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Sat, 22 Apr 2023 10:08:11 -0400 Subject: [PATCH] ceph-17.2.6, rebuild with bundled rocksdb until ready for rocksdb-8.x Signed-off-by: Kaleb S. KEITHLEY --- ...-src-kv-rocksdb_cache-ShardedCache.h.patch | 91 ------------------- ...-block_based-data_block_hash_index.h.patch | 40 ++++++++ ceph.spec | 6 +- 3 files changed, 43 insertions(+), 94 deletions(-) delete mode 100644 0027-src-kv-rocksdb_cache-ShardedCache.h.patch create mode 100644 0027-src-rocksdb-table-block_based-data_block_hash_index.h.patch diff --git a/0027-src-kv-rocksdb_cache-ShardedCache.h.patch b/0027-src-kv-rocksdb_cache-ShardedCache.h.patch deleted file mode 100644 index 4ed7f36..0000000 --- a/0027-src-kv-rocksdb_cache-ShardedCache.h.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- ceph-17.2.6/src/kv/rocksdb_cache/ShardedCache.h.orig 2023-04-20 10:53:44.854094016 -0400 -+++ ceph-17.2.6/src/kv/rocksdb_cache/ShardedCache.h 2023-04-20 11:39:12.847646205 -0400 -@@ -15,7 +15,7 @@ - #include - - #include "rocksdb/version.h" --#include "rocksdb/cache.h" -+#include "rocksdb/advanced_cache.h" - #include "include/ceph_hash.h" - #include "common/PriorityCache.h" - //#include "hash.h" -@@ -68,8 +68,8 @@ - virtual const char* Name() const override = 0; - virtual rocksdb::Status Insert(const rocksdb::Slice& key, void* value, size_t charge, - DeleterFn, -- rocksdb::Cache::Handle** handle, Priority priority) override; -- virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats) override; -+ rocksdb::Cache::Handle** handle, Priority priority); -+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats); - virtual bool Ref(rocksdb::Cache::Handle* handle) override; - virtual bool Release(rocksdb::Cache::Handle* handle, bool force_erase = false) override; - virtual void* Value(Handle* handle) override = 0; -@@ -84,14 +84,14 @@ - virtual size_t GetPinnedUsage() const override; - virtual size_t GetCharge(Handle* handle) const = 0; - #if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) -- virtual DeleterFn GetDeleter(Handle* handle) const override; -+ virtual DeleterFn GetDeleter(Handle* handle) const; - #endif - virtual void DisownData() override = 0; - #if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) - virtual void ApplyToAllEntries( - const std::function& callback, -- const ApplyToAllEntriesOptions& opts) override; -+ const ApplyToAllEntriesOptions& opts); - #else - virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), - bool thread_safe) override; ---- ceph-17.2.6/src/kv/RocksDBStore.cc.orig 2023-04-20 13:27:30.331781763 -0400 -+++ ceph-17.2.6/src/kv/RocksDBStore.cc 2023-04-20 13:54:20.742215113 -0400 -@@ -903,6 +903,19 @@ - // base_name - name of column without shard suffix: "-"+number - // options - additional options to apply - // cf_opt - column family options to update -+ -+Status GetColumnFamilyOptionsFromMap( -+ const ColumnFamilyOptions& base_options, -+ const std::unordered_map& opts_map, -+ ColumnFamilyOptions* new_options, bool input_strings_escaped, -+ bool ignore_unknown_options) { -+ ConfigOptions config_options; -+ config_options.ignore_unknown_options = ignore_unknown_options; -+ config_options.input_strings_escaped = input_strings_escaped; -+ return rocksdb::GetColumnFamilyOptionsFromMap(config_options, base_options, opts_map, -+ new_options); -+} -+ - int RocksDBStore::update_column_family_options(const std::string& base_name, - const std::string& more_options, - rocksdb::ColumnFamilyOptions* cf_opt) -@@ -916,7 +929,7 @@ - << " options=" << more_options << dendl; - return r; - } -- status = rocksdb::GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt); -+ status = GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt, false); - if (!status.ok()) { - dout(5) << __func__ << " invalid column family optionsp; column family=" - << base_name << " options=" << more_options << dendl; -@@ -937,6 +950,20 @@ - return 0; - } - -+Status GetBlockBasedTableOptionsFromMap( -+ const BlockBasedTableOptions& table_options, -+ const std::unordered_map& opts_map, -+ BlockBasedTableOptions* new_table_options, bool input_strings_escaped, -+ bool ignore_unknown_options) { -+ ConfigOptions config_options; -+ config_options.input_strings_escaped = input_strings_escaped; -+ config_options.ignore_unknown_options = ignore_unknown_options; -+ config_options.invoke_prepare_options = false; -+ -+ return rocksdb::GetBlockBasedTableOptionsFromMap(config_options, table_options, -+ opts_map, new_table_options); -+} -+ - int RocksDBStore::apply_block_cache_options(const std::string& column_name, - const std::string& block_cache_opt, - rocksdb::ColumnFamilyOptions* cf_opt) diff --git a/0027-src-rocksdb-table-block_based-data_block_hash_index.h.patch b/0027-src-rocksdb-table-block_based-data_block_hash_index.h.patch new file mode 100644 index 0000000..d03276f --- /dev/null +++ b/0027-src-rocksdb-table-block_based-data_block_hash_index.h.patch @@ -0,0 +1,40 @@ +--- ceph-17.2.6/src/rocksdb/table/block_based/data_block_hash_index.h.orig 2023-04-21 17:46:42.186339184 -0400 ++++ ceph-17.2.6/src/rocksdb/table/block_based/data_block_hash_index.h 2023-04-21 17:47:01.392005151 -0400 +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include "rocksdb/slice.h" + +--- ceph-17.2.6/src/rocksdb/util/string_util.h.orig 2023-04-21 18:13:51.060496792 -0400 ++++ ceph-17.2.6/src/rocksdb/util/string_util.h 2023-04-21 18:14:06.496223220 -0400 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "rocksdb/rocksdb_namespace.h" + +--- ceph-17.2.6/src/rocksdb/include/rocksdb/utilities/checkpoint.h.orig 2023-04-22 05:54:32.260798114 -0400 ++++ ceph-17.2.6/src/rocksdb/include/rocksdb/utilities/checkpoint.h 2023-04-22 05:55:42.997522143 -0400 +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include "rocksdb/status.h" + + namespace ROCKSDB_NAMESPACE { +--- ceph-17.2.6/src/rocksdb/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h.orig 2023-04-22 06:14:55.624679075 -0400 ++++ ceph-17.2.6/src/rocksdb/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h 2023-04-22 09:18:39.424624618 -0400 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + + namespace folly { diff --git a/ceph.spec b/ceph.spec index 8499f58..fed97ce 100644 --- a/ceph.spec +++ b/ceph.spec @@ -193,7 +193,7 @@ Patch0023: 0023-src-s3select-include-s3select_parquet_intrf.h.patch Patch0024: 0024-gcc-13.patch Patch0025: 0025-selinux-prepare-for-anon-inode-controls-enablement.patch Patch0026: 0026-src-boost-libs-python-src-object.patch -Patch0027: 0027-src-kv-rocksdb_cache-ShardedCache.h.patch +Patch0027: 0027-src-rocksdb-table-block_based-data_block_hash_index.h.patch # ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl %if 0%{?suse_version} @@ -1384,7 +1384,7 @@ env | sort -DWITH_OCF:BOOL=ON \ %endif %if 0%{?fedora} || 0%{?rhel} >= 10 - -DWITH_SYSTEM_ROCKSDB:BOOL=ON \ + -DWITH_SYSTEM_ROCKSDB:BOOL=OFF \ %endif -DWITH_SYSTEM_LIBURING:BOOL=ON \ -DWITH_SYSTEM_BOOST:BOOL=OFF \ @@ -2619,7 +2619,7 @@ exit 0 %changelog * Thu Apr 20 2023 Kaleb S. KEITHLEY - 2:17.2.6-2 -- ceph-17.2.6, rebuild with rocksdb-8.0.0 +- ceph-17.2.6, rebuild with bundled rocksdb until ready for rocksdb-8.x * Fri Apr 7 2023 Kaleb S. KEITHLEY - 2:17.2.6-1 - ceph-17.2.6 GA