summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-17 19:32:07 -0800
committerKhem Raj <raj.khem@gmail.com>2018-12-18 22:15:59 -0800
commite052ea1b7494715d95c88c81746a987452707282 (patch)
tree813c0c6c0821f9f18380c37d22e672476127a35b /meta-oe/recipes-dbs
parentc011beeaa666cf02f952ef53630a0c2bc80bcc04 (diff)
downloadmeta-openembedded-e052ea1b7494715d95c88c81746a987452707282.tar.gz
rocksdb: Upgrade to 5.17.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch194
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb7
2 files changed, 3 insertions, 198 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch b/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
deleted file mode 100644
index be498974a..000000000
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
+++ /dev/null
@@ -1,194 +0,0 @@
1From 8d65d70b54d1d306a0a0b00e036bc8ddd39d8ec1 Mon Sep 17 00:00:00 2001
2From: "przemyslaw.skibinski@percona.com" <przemyslaw.skibinski@percona.com>
3Date: Fri, 20 Apr 2018 13:28:05 -0700
4Subject: [PATCH] Fix GitHub issue #3716: gcc-8 warnings
5
6Summary:
7Fix the following gcc-8 warnings:
8- conflicting C language linkage declaration [-Werror]
9- writing to an object with no trivial copy-assignment [-Werror=class-memaccess]
10- array subscript -1 is below array bounds [-Werror=array-bounds]
11
12Solves https://github.com/facebook/rocksdb/issues/3716
13Closes https://github.com/facebook/rocksdb/pull/3736
14
15Differential Revision: D7684161
16
17Pulled By: yiwu-arbug
18
19fbshipit-source-id: 47c0423d26b74add251f1d3595211eee1e41e54a
20---
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/dee95a1afc6c63515e7d94dec33acdb79638b6d7.patch]
23
24 db/c.cc | 77 ++++++++++++++-------------------------
25 memtable/inlineskiplist.h | 12 +++---
26 2 files changed, 33 insertions(+), 56 deletions(-)
27
28diff --git a/db/c.cc b/db/c.cc
29index 064103ed4..0d485d096 100644
30--- a/db/c.cc
31+++ b/db/c.cc
32@@ -1388,23 +1388,24 @@ void rocksdb_writebatch_put_log_data(
33 b->rep.PutLogData(Slice(blob, len));
34 }
35
36+class H : public WriteBatch::Handler {
37+ public:
38+ void* state_;
39+ void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
40+ void (*deleted_)(void*, const char* k, size_t klen);
41+ virtual void Put(const Slice& key, const Slice& value) override {
42+ (*put_)(state_, key.data(), key.size(), value.data(), value.size());
43+ }
44+ virtual void Delete(const Slice& key) override {
45+ (*deleted_)(state_, key.data(), key.size());
46+ }
47+};
48+
49 void rocksdb_writebatch_iterate(
50 rocksdb_writebatch_t* b,
51 void* state,
52 void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
53 void (*deleted)(void*, const char* k, size_t klen)) {
54- class H : public WriteBatch::Handler {
55- public:
56- void* state_;
57- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
58- void (*deleted_)(void*, const char* k, size_t klen);
59- virtual void Put(const Slice& key, const Slice& value) override {
60- (*put_)(state_, key.data(), key.size(), value.data(), value.size());
61- }
62- virtual void Delete(const Slice& key) override {
63- (*deleted_)(state_, key.data(), key.size());
64- }
65- };
66 H handler;
67 handler.state_ = state;
68 handler.put_ = put;
69@@ -1649,18 +1650,6 @@ void rocksdb_writebatch_wi_iterate(
70 void* state,
71 void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
72 void (*deleted)(void*, const char* k, size_t klen)) {
73- class H : public WriteBatch::Handler {
74- public:
75- void* state_;
76- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
77- void (*deleted_)(void*, const char* k, size_t klen);
78- virtual void Put(const Slice& key, const Slice& value) override {
79- (*put_)(state_, key.data(), key.size(), value.data(), value.size());
80- }
81- virtual void Delete(const Slice& key) override {
82- (*deleted_)(state_, key.data(), key.size());
83- }
84- };
85 H handler;
86 handler.state_ = state;
87 handler.put_ = put;
88@@ -3109,20 +3098,21 @@ void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t* st) {
89 delete st;
90 }
91
92+struct Wrapper : public rocksdb_slicetransform_t {
93+ const SliceTransform* rep_;
94+ ~Wrapper() { delete rep_; }
95+ const char* Name() const override { return rep_->Name(); }
96+ Slice Transform(const Slice& src) const override {
97+ return rep_->Transform(src);
98+ }
99+ bool InDomain(const Slice& src) const override {
100+ return rep_->InDomain(src);
101+ }
102+ bool InRange(const Slice& src) const override { return rep_->InRange(src); }
103+ static void DoNothing(void*) { }
104+};
105+
106 rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
107- struct Wrapper : public rocksdb_slicetransform_t {
108- const SliceTransform* rep_;
109- ~Wrapper() { delete rep_; }
110- const char* Name() const override { return rep_->Name(); }
111- Slice Transform(const Slice& src) const override {
112- return rep_->Transform(src);
113- }
114- bool InDomain(const Slice& src) const override {
115- return rep_->InDomain(src);
116- }
117- bool InRange(const Slice& src) const override { return rep_->InRange(src); }
118- static void DoNothing(void*) { }
119- };
120 Wrapper* wrapper = new Wrapper;
121 wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen);
122 wrapper->state_ = nullptr;
123@@ -3131,19 +3121,6 @@ rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t pref
124 }
125
126 rocksdb_slicetransform_t* rocksdb_slicetransform_create_noop() {
127- struct Wrapper : public rocksdb_slicetransform_t {
128- const SliceTransform* rep_;
129- ~Wrapper() { delete rep_; }
130- const char* Name() const override { return rep_->Name(); }
131- Slice Transform(const Slice& src) const override {
132- return rep_->Transform(src);
133- }
134- bool InDomain(const Slice& src) const override {
135- return rep_->InDomain(src);
136- }
137- bool InRange(const Slice& src) const override { return rep_->InRange(src); }
138- static void DoNothing(void*) { }
139- };
140 Wrapper* wrapper = new Wrapper;
141 wrapper->rep_ = rocksdb::NewNoopTransform();
142 wrapper->state_ = nullptr;
143diff --git a/memtable/inlineskiplist.h b/memtable/inlineskiplist.h
144index 702a7336d..eadda1dc1 100644
145--- a/memtable/inlineskiplist.h
146+++ b/memtable/inlineskiplist.h
147@@ -280,7 +280,7 @@ struct InlineSkipList<Comparator>::Node {
148 // next_[0]. This is used for passing data from AllocateKey to Insert.
149 void StashHeight(const int height) {
150 assert(sizeof(int) <= sizeof(next_[0]));
151- memcpy(&next_[0], &height, sizeof(int));
152+ memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
153 }
154
155 // Retrieves the value passed to StashHeight. Undefined after a call
156@@ -300,30 +300,30 @@ struct InlineSkipList<Comparator>::Node {
157 assert(n >= 0);
158 // Use an 'acquire load' so that we observe a fully initialized
159 // version of the returned Node.
160- return (next_[-n].load(std::memory_order_acquire));
161+ return ((&next_[0] - n)->load(std::memory_order_acquire));
162 }
163
164 void SetNext(int n, Node* x) {
165 assert(n >= 0);
166 // Use a 'release store' so that anybody who reads through this
167 // pointer observes a fully initialized version of the inserted node.
168- next_[-n].store(x, std::memory_order_release);
169+ (&next_[0] - n)->store(x, std::memory_order_release);
170 }
171
172 bool CASNext(int n, Node* expected, Node* x) {
173 assert(n >= 0);
174- return next_[-n].compare_exchange_strong(expected, x);
175+ return (&next_[0] - n)->compare_exchange_strong(expected, x);
176 }
177
178 // No-barrier variants that can be safely used in a few locations.
179 Node* NoBarrier_Next(int n) {
180 assert(n >= 0);
181- return next_[-n].load(std::memory_order_relaxed);
182+ return (&next_[0] - n)->load(std::memory_order_relaxed);
183 }
184
185 void NoBarrier_SetNext(int n, Node* x) {
186 assert(n >= 0);
187- next_[-n].store(x, std::memory_order_relaxed);
188+ (&next_[0] - n)->store(x, std::memory_order_relaxed);
189 }
190
191 // Insert node after prev on specific level.
192--
1932.17.0
194
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 594d1a9c7..67822477e 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -6,12 +6,11 @@ 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
9SRCREV = "c60df9d9e7629fe208a9b848293a5599f83d5e77" 9SRCREV = "f438b98e552010613cff8684a7d84191ed785148"
10SRCBRANCH = "5.13.fb" 10SRCBRANCH = "5.17.fb"
11PV = "5.13.1" 11PV = "5.17.2"
12 12
13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ 13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
14 file://0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch \
15 " 14 "
16 15
17S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"