diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-28 01:12:53 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-12-29 10:32:10 -0800 |
commit | 8b80ce4fdd56f741361952785d23a9df09edecc3 (patch) | |
tree | 2900c5cd867f7d4ef6e1a70ca0d02116e75af212 | |
parent | c2d649925e2e9fde05154aa77566adf297d8ea84 (diff) | |
download | meta-openembedded-8b80ce4fdd56f741361952785d23a9df09edecc3.tar.gz |
rocksdb: Upgrade to 6.5.2
Backport an upstream patch to fix build
Delete patches which are either upstreamed or not required
Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 files changed, 43 insertions, 211 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch deleted file mode 100644 index 9682f8ad4..000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 38146a5d803a1fb9b10f011aa857872b6f20cd02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tongliang Liao <xkszltl@gmail.com> | ||
3 | Date: Mon, 29 Apr 2019 03:51:51 -0700 | ||
4 | Subject: [PATCH] CMake has stock FindZLIB in upper case. More details in | ||
5 | https://cmake.org/cmake/help/v3.14/module/FindZLIB.html | ||
6 | |||
7 | |||
8 | Upstream-Status: Backport https://github.com/facebook/rocksdb/pull/5261 | ||
9 | |||
10 | --- | ||
11 | CMakeLists.txt | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 40cdd26bb..355686566 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -92,7 +92,7 @@ else() | ||
19 | endif() | ||
20 | |||
21 | if(WITH_ZLIB) | ||
22 | - find_package(zlib REQUIRED) | ||
23 | + find_package(ZLIB REQUIRED) | ||
24 | add_definitions(-DZLIB) | ||
25 | if(ZLIB_INCLUDE_DIRS) | ||
26 | # CMake 3 | ||
27 | -- | ||
28 | 2.11.0 | ||
29 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch deleted file mode 100644 index eccaa3a37..000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From ee728434124b9b7d17abbd060a62aac79a9b79c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 12 Feb 2019 14:31:24 -0800 | ||
4 | Subject: [PATCH] Disable -Wshadow and do not mark default copy constructors | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | CMakeLists.txt | 2 +- | ||
9 | utilities/persistent_cache/block_cache_tier.h | 4 ++-- | ||
10 | utilities/persistent_cache/block_cache_tier_file.h | 2 +- | ||
11 | 3 files changed, 4 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
14 | index 98e2e1973..3a24a075b 100644 | ||
15 | --- a/CMakeLists.txt | ||
16 | +++ b/CMakeLists.txt | ||
17 | @@ -254,7 +254,7 @@ if(FAIL_ON_WARNINGS) | ||
18 | if(MSVC) | ||
19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") | ||
20 | else() # assume GCC | ||
21 | - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") | ||
22 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=shadow") | ||
23 | endif() | ||
24 | endif() | ||
25 | |||
26 | diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h | ||
27 | index 2b2c0ef4f..96d0540a4 100644 | ||
28 | --- a/utilities/persistent_cache/block_cache_tier.h | ||
29 | +++ b/utilities/persistent_cache/block_cache_tier.h | ||
30 | @@ -91,9 +91,9 @@ class BlockCacheTier : public PersistentCacheTier { | ||
31 | : key_(std::move(key)), data_(data) {} | ||
32 | ~InsertOp() {} | ||
33 | |||
34 | - InsertOp() = delete; | ||
35 | + InsertOp() = default; | ||
36 | InsertOp(InsertOp&& /*rhs*/) = default; | ||
37 | - InsertOp& operator=(InsertOp&& rhs) = default; | ||
38 | + InsertOp& operator=(InsertOp&& rhs) = delete; | ||
39 | |||
40 | // used for estimating size by bounded queue | ||
41 | size_t Size() { return data_.size() + key_.size(); } | ||
42 | diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h | ||
43 | index e38b6c9a1..d9b89a4f7 100644 | ||
44 | --- a/utilities/persistent_cache/block_cache_tier_file.h | ||
45 | +++ b/utilities/persistent_cache/block_cache_tier_file.h | ||
46 | @@ -262,7 +262,7 @@ class ThreadedWriter : public Writer { | ||
47 | : file_(file), buf_(buf), file_off_(file_off), callback_(callback) {} | ||
48 | |||
49 | IO(const IO&) = default; | ||
50 | - IO& operator=(const IO&) = default; | ||
51 | + IO& operator=(const IO&) = delete; | ||
52 | size_t Size() const { return sizeof(IO); } | ||
53 | |||
54 | WritableFile* file_ = nullptr; // File to write to | ||
55 | -- | ||
56 | 2.20.1 | ||
57 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-breakage-from-lock_guard-error-6161.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-breakage-from-lock_guard-error-6161.patch new file mode 100644 index 000000000..ac87d0c60 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-breakage-from-lock_guard-error-6161.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From b626703de7ece507f360507e49d3ecb448b12e07 Mon Sep 17 00:00:00 2001 | ||
2 | From: Maysam Yabandeh <myabandeh@fb.com> | ||
3 | Date: Thu, 12 Dec 2019 13:48:50 -0800 | ||
4 | Subject: [PATCH] Fix build breakage from lock_guard error (#6161) | ||
5 | |||
6 | Summary: | ||
7 | This change fixes a source issue that caused compile time error which breaks build for many fbcode services in that setup. The size() member function of channel is a const member, so member variables accessed within it are implicitly const as well. This caused error when clang fails to resolve to a constructor that takes std::mutex because the suitable constructor got rejected due to loss of constness for its argument. The fix is to add mutable modifier to the lock_ member of channel. | ||
8 | Pull Request resolved: https://github.com/facebook/rocksdb/pull/6161 | ||
9 | |||
10 | Differential Revision: D18967685 | ||
11 | |||
12 | Pulled By: maysamyabandeh | ||
13 | |||
14 | Upstream-Status: Backport | ||
15 | |||
16 | fbshipit-source-id: 698b6a5153c3c92eeacb842c467aa28cc350d432 | ||
17 | --- | ||
18 | util/channel.h | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/util/channel.h b/util/channel.h | ||
22 | index 0225482c0..a8a47680a 100644 | ||
23 | --- a/util/channel.h | ||
24 | +++ b/util/channel.h | ||
25 | @@ -60,7 +60,7 @@ class channel { | ||
26 | |||
27 | private: | ||
28 | std::condition_variable cv_; | ||
29 | - std::mutex lock_; | ||
30 | + mutable std::mutex lock_; | ||
31 | std::queue<T> buffer_; | ||
32 | bool eof_; | ||
33 | }; | ||
34 | -- | ||
35 | 2.24.1 | ||
36 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch deleted file mode 100644 index ba9834dfe..000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | From 512aaf3d833973f6146c6f1235b590901876175e Mon Sep 17 00:00:00 2001 | ||
2 | From: biocodz <biocodz@protonmail.com> | ||
3 | Date: Fri, 7 Jun 2019 09:49:37 -0400 | ||
4 | Subject: [PATCH] fix Issue 5303 | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/5426] | ||
7 | |||
8 | --- | ||
9 | db/internal_stats.h | 21 +++++++++++++++++++++ | ||
10 | db/version_edit.h | 8 ++++++++ | ||
11 | utilities/persistent_cache/persistent_cache_util.h | 2 +- | ||
12 | 3 files changed, 30 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/db/internal_stats.h b/db/internal_stats.h | ||
15 | index 6fa8727a4..09447644d 100644 | ||
16 | --- a/db/internal_stats.h | ||
17 | +++ b/db/internal_stats.h | ||
18 | @@ -236,6 +236,27 @@ class InternalStats { | ||
19 | } | ||
20 | } | ||
21 | |||
22 | + CompactionStats & operator=(const CompactionStats& c) { | ||
23 | + count = c.count; | ||
24 | + micros = c.micros; | ||
25 | + cpu_micros = c.cpu_micros; | ||
26 | + bytes_read_non_output_levels = c.bytes_read_non_output_levels; | ||
27 | + bytes_read_output_level = c.bytes_read_output_level; | ||
28 | + bytes_written = c.bytes_written; | ||
29 | + bytes_moved = c.bytes_moved; | ||
30 | + num_input_files_in_non_output_levels = | ||
31 | + c.num_input_files_in_non_output_levels; | ||
32 | + num_input_files_in_output_level = c.num_input_files_in_output_level; | ||
33 | + num_output_files = c.num_output_files; | ||
34 | + num_input_records = c.num_input_records; | ||
35 | + num_dropped_records = c.num_dropped_records; | ||
36 | + int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons); | ||
37 | + for (int i = 0; i < num_of_reasons; i++) { | ||
38 | + counts[i] = c.counts[i]; | ||
39 | + } | ||
40 | + return *this; | ||
41 | + } | ||
42 | + | ||
43 | void Clear() { | ||
44 | this->micros = 0; | ||
45 | this->cpu_micros = 0; | ||
46 | diff --git a/db/version_edit.h b/db/version_edit.h | ||
47 | index 229531792..5c50ef552 100644 | ||
48 | --- a/db/version_edit.h | ||
49 | +++ b/db/version_edit.h | ||
50 | @@ -52,6 +52,14 @@ struct FileDescriptor { | ||
51 | smallest_seqno(_smallest_seqno), | ||
52 | largest_seqno(_largest_seqno) {} | ||
53 | |||
54 | + FileDescriptor(const FileDescriptor& fd) { | ||
55 | + table_reader = fd.table_reader; | ||
56 | + packed_number_and_path_id = fd.packed_number_and_path_id; | ||
57 | + file_size = fd.file_size; | ||
58 | + smallest_seqno = fd.smallest_seqno; | ||
59 | + largest_seqno = fd.largest_seqno; | ||
60 | + } | ||
61 | + | ||
62 | FileDescriptor& operator=(const FileDescriptor& fd) { | ||
63 | table_reader = fd.table_reader; | ||
64 | packed_number_and_path_id = fd.packed_number_and_path_id; | ||
65 | diff --git a/utilities/persistent_cache/persistent_cache_util.h b/utilities/persistent_cache/persistent_cache_util.h | ||
66 | index 214bb5875..254c038f9 100644 | ||
67 | --- a/utilities/persistent_cache/persistent_cache_util.h | ||
68 | +++ b/utilities/persistent_cache/persistent_cache_util.h | ||
69 | @@ -48,7 +48,7 @@ class BoundedQueue { | ||
70 | T t = std::move(q_.front()); | ||
71 | size_ -= t.Size(); | ||
72 | q_.pop_front(); | ||
73 | - return std::move(t); | ||
74 | + return t; | ||
75 | } | ||
76 | |||
77 | size_t Size() const { | ||
78 | -- | ||
79 | 2.11.0 | ||
80 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch deleted file mode 100644 index ef0429a3c..000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 8996f075e64da0e6ffeda57632ef31f8710defcc Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Fri, 15 Mar 2019 16:47:03 +0800 | ||
4 | Subject: [PATCH] utilities: Fix build failure with -Werror=maybe-uninitialized | ||
5 | |||
6 | Summary: | ||
7 | Initialize magic_number to zero to avoid such failure. | ||
8 | utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used | ||
9 | uninitialized in this function [-Werror=maybe-uninitialized] | ||
10 | if (magic_number != kMagicNumber) { | ||
11 | ^~ | ||
12 | |||
13 | Upstream-Status: Accepted [expected version 5.19] | ||
14 | |||
15 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
16 | --- | ||
17 | utilities/blob_db/blob_log_format.cc | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/utilities/blob_db/blob_log_format.cc b/utilities/blob_db/blob_log_format.cc | ||
21 | index 2bf7028..8726cb8 100644 | ||
22 | --- a/utilities/blob_db/blob_log_format.cc | ||
23 | +++ b/utilities/blob_db/blob_log_format.cc | ||
24 | @@ -82,7 +82,7 @@ Status BlobLogFooter::DecodeFrom(Slice src) { | ||
25 | uint32_t src_crc = 0; | ||
26 | src_crc = crc32c::Value(src.data(), BlobLogFooter::kSize - sizeof(uint32_t)); | ||
27 | src_crc = crc32c::Mask(src_crc); | ||
28 | - uint32_t magic_number; | ||
29 | + uint32_t magic_number = 0; | ||
30 | if (!GetFixed32(&src, &magic_number) || !GetFixed64(&src, &blob_count) || | ||
31 | !GetFixed64(&src, &expiration_range.first) || | ||
32 | !GetFixed64(&src, &expiration_range.second) || !GetFixed32(&src, &crc)) { | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb index 9fd5ee15b..68c6bc2ff 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | |||
@@ -6,15 +6,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | |||
6 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 6 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
7 | file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" | 7 | file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" |
8 | 8 | ||
9 | SRCREV = "628a7fd74b5611657106c57f724f1682b114684c" | 9 | SRCREV = "4cfbd87afd08a16df28436fb990ef6b154ee6114" |
10 | SRCBRANCH = "6.0.fb" | 10 | SRCBRANCH = "6.5.fb" |
11 | PV = "6.0.2" | 11 | PV = "6.5.2" |
12 | 12 | ||
13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ | 13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ |
14 | file://0001-CMake-has-stock-FindZLIB-in-upper-case.patch \ | 14 | file://0001-Fix-build-breakage-from-lock_guard-error-6161.patch \ |
15 | file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \ | ||
16 | file://0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch \ | ||
17 | file://0001-fix-Issue-5303.patch \ | ||
18 | " | 15 | " |
19 | 16 | ||
20 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
@@ -22,9 +19,9 @@ S = "${WORKDIR}/git" | |||
22 | inherit cmake | 19 | inherit cmake |
23 | 20 | ||
24 | PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" | 21 | PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" |
25 | PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON -DBZIP2_LIBRARIES:STRING=bz2,-DWITH_BZ2=OFF,bzip2" | 22 | PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2" |
26 | PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON -DLZ4_LIBRARIES:STRING=lz4,-DWITH_LZ4=OFF,lz4" | 23 | PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4" |
27 | PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON -DZLIB_LIBRARY:STRING=z,-DWITH_ZLIB=OFF,zlib" | 24 | PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" |
28 | PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" | 25 | PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" |
29 | PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" | 26 | PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" |
30 | PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" | 27 | PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" |