c46fd83b70
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
80 lines
3.6 KiB
Diff
80 lines
3.6 KiB
Diff
--- ceph-17.2.0/src/kv/RocksDBStore.cc.orig 2022-05-19 10:02:04.949165746 -0400
|
|
+++ ceph-17.2.0/src/kv/RocksDBStore.cc 2022-05-19 11:04:30.647668997 -0400
|
|
@@ -1353,9 +1353,7 @@
|
|
const string& key_prefix)
|
|
{
|
|
uint64_t size = 0;
|
|
- uint8_t flags =
|
|
- //rocksdb::DB::INCLUDE_MEMTABLES | // do not include memtables...
|
|
- rocksdb::DB::INCLUDE_FILES;
|
|
+ // uint8_t flags = SizeApproximationFlags::INCLUDE_FILES;
|
|
auto p_iter = cf_handles.find(prefix);
|
|
if (p_iter != cf_handles.end()) {
|
|
for (auto cf : p_iter->second.handles) {
|
|
@@ -1363,14 +1361,14 @@
|
|
string start = key_prefix + string(1, '\x00');
|
|
string limit = key_prefix + string("\xff\xff\xff\xff");
|
|
rocksdb::Range r(start, limit);
|
|
- db->GetApproximateSizes(cf, &r, 1, &s, flags);
|
|
+ db->GetApproximateSizes(cf, &r, 1, &s);
|
|
size += s;
|
|
}
|
|
} else {
|
|
string start = combine_strings(prefix , key_prefix);
|
|
string limit = combine_strings(prefix , key_prefix + "\xff\xff\xff\xff");
|
|
rocksdb::Range r(start, limit);
|
|
- db->GetApproximateSizes(default_cf, &r, 1, &size, flags);
|
|
+ db->GetApproximateSizes(default_cf, &r, 1, &size);
|
|
}
|
|
return size;
|
|
}
|
|
--- ceph-17.2.0/src/kv/rocksdb_cache/BinnedLRUCache.cc.orig 2022-05-19 14:13:10.079111406 -0400
|
|
+++ ceph-17.2.0/src/kv/rocksdb_cache/BinnedLRUCache.cc 2022-05-19 14:13:38.023627506 -0400
|
|
@@ -570,7 +570,7 @@
|
|
#endif // !__SANITIZE_ADDRESS__
|
|
}
|
|
|
|
-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
|
|
+#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22))
|
|
DeleterFn BinnedLRUCache::GetDeleter(Handle* handle) const
|
|
{
|
|
return reinterpret_cast<const BinnedLRUHandle*>(handle)->deleter;
|
|
--- ceph-17.2.0/src/kv/rocksdb_cache/BinnedLRUCache.h.orig 2022-05-19 13:09:33.549473929 -0400
|
|
+++ ceph-17.2.0/src/kv/rocksdb_cache/BinnedLRUCache.h 2022-05-19 13:10:26.990543898 -0400
|
|
@@ -327,7 +327,7 @@
|
|
virtual size_t GetCharge(Handle* handle) const override;
|
|
virtual uint32_t GetHash(Handle* handle) const override;
|
|
virtual void DisownData() override;
|
|
-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
|
|
+#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22))
|
|
virtual DeleterFn GetDeleter(Handle* handle) const override;
|
|
#endif
|
|
// Retrieves number of elements in LRU, for unit test purpose only
|
|
--- ceph-17.2.0/src/kv/rocksdb_cache/ShardedCache.cc.orig 2022-05-19 14:14:49.379391874 -0400
|
|
+++ ceph-17.2.0/src/kv/rocksdb_cache/ShardedCache.cc 2022-05-19 14:15:09.797038318 -0400
|
|
@@ -109,7 +109,7 @@
|
|
return usage;
|
|
}
|
|
|
|
-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
|
|
+#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22))
|
|
DeleterFn ShardedCache::GetDeleter(Handle* handle) const
|
|
{
|
|
uint32_t hash = GetHash(handle);
|
|
--- ceph-17.2.0/src/kv/rocksdb_cache/ShardedCache.h.orig 2022-05-19 14:13:53.251363817 -0400
|
|
+++ ceph-17.2.0/src/kv/rocksdb_cache/ShardedCache.h 2022-05-19 14:14:29.749731795 -0400
|
|
@@ -83,11 +83,11 @@
|
|
virtual size_t GetUsage(rocksdb::Cache::Handle* handle) const override;
|
|
virtual size_t GetPinnedUsage() const override;
|
|
virtual size_t GetCharge(Handle* handle) const = 0;
|
|
-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
|
|
+#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22))
|
|
virtual DeleterFn GetDeleter(Handle* handle) const override;
|
|
#endif
|
|
virtual void DisownData() override = 0;
|
|
-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
|
|
+#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22))
|
|
virtual void ApplyToAllEntries(
|
|
const std::function<void(const rocksdb::Slice& key, void* value, size_t charge,
|
|
DeleterFn deleter)>& callback,
|