Skip to content

Commit da4b714

Browse files
authored
Upgrade to rocksdb v7.3.1 (tikv#645)
1 parent 8375071 commit da4b714

File tree

6 files changed

+293
-266
lines changed

6 files changed

+293
-266
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ serde1 = ["serde"]
3434

3535
[dependencies]
3636
libc = "0.2"
37-
librocksdb-sys = { path = "librocksdb-sys", version = "0.7.0" }
37+
librocksdb-sys = { path = "librocksdb-sys", version = "0.7.1" }
3838
serde = { version = "1", features = [ "derive" ], optional = true }
3939

4040
[dev-dependencies]

librocksdb-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "librocksdb-sys"
3-
version = "0.7.0+7.1.2"
3+
version = "0.7.1+7.3.1"
44
edition = "2018"
55
authors = ["Karl Hobley <[email protected]>", "Arkadiy Paronyan <[email protected]>"]
66
license = "MIT/Apache-2.0/BSD-3-Clause"

librocksdb-sys/build_version.cc

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,33 @@
33
#include <memory>
44

55
#include "rocksdb/version.h"
6+
#include "rocksdb/utilities/object_registry.h"
67
#include "util/string_util.h"
78

89
// The build script may replace these values with real values based
910
// on whether or not GIT is available and the platform settings
10-
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:00724f43bcea4d82b371a3e43ebec91cfe8c11be";
11-
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:7.1.2" ;
12-
static const std::string rocksdb_build_date = "rocksdb_build_date:2022-04-21 06:19:00";
11+
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:8e0f495253f62904a4ca6d3ec6a03391a12b0a45";
12+
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:v7.3.1";
13+
#define HAS_GIT_CHANGES 0
14+
#if HAS_GIT_CHANGES == 0
15+
// If HAS_GIT_CHANGES is 0, the GIT date is used.
16+
// Use the time the branch/tag was last modified
17+
static const std::string rocksdb_build_date = "rocksdb_build_date:2022-06-08 12:46:15";
18+
#else
19+
// If HAS_GIT_CHANGES is > 0, the branch/tag has modifications.
20+
// Use the time the build was created.
21+
static const std::string rocksdb_build_date = "rocksdb_build_date:2022-06-21 21:46:08";
22+
#endif
23+
24+
#ifndef ROCKSDB_LITE
25+
extern "C" {
26+
27+
} // extern "C"
28+
29+
std::unordered_map<std::string, ROCKSDB_NAMESPACE::RegistrarFunc> ROCKSDB_NAMESPACE::ObjectRegistry::builtins_ = {
30+
31+
};
32+
#endif //ROCKSDB_LITE
1333

1434
namespace ROCKSDB_NAMESPACE {
1535
static void AddProperty(std::unordered_map<std::string, std::string> *props, const std::string& name) {
@@ -23,7 +43,7 @@ static void AddProperty(std::unordered_map<std::string, std::string> *props, con
2343
}
2444
}
2545
}
26-
46+
2747
static std::unordered_map<std::string, std::string>* LoadPropertiesSet() {
2848
auto * properties = new std::unordered_map<std::string, std::string>();
2949
AddProperty(properties, rocksdb_build_git_sha);
@@ -38,14 +58,14 @@ const std::unordered_map<std::string, std::string>& GetRocksBuildProperties() {
3858
}
3959

4060
std::string GetRocksVersionAsString(bool with_patch) {
41-
std::string version = ToString(ROCKSDB_MAJOR) + "." + ToString(ROCKSDB_MINOR);
61+
std::string version = std::to_string(ROCKSDB_MAJOR) + "." + std::to_string(ROCKSDB_MINOR);
4262
if (with_patch) {
43-
return version + "." + ToString(ROCKSDB_PATCH);
63+
return version + "." + std::to_string(ROCKSDB_PATCH);
4464
} else {
4565
return version;
46-
}
66+
}
4767
}
48-
68+
4969
std::string GetRocksBuildInfoAsString(const std::string& program, bool verbose) {
5070
std::string info = program + " (RocksDB) " + GetRocksVersionAsString(true);
5171
if (verbose) {
@@ -59,4 +79,3 @@ std::string GetRocksBuildInfoAsString(const std::string& program, bool verbose)
5979
return info;
6080
}
6181
} // namespace ROCKSDB_NAMESPACE
62-

librocksdb-sys/rocksdb

Submodule rocksdb updated 521 files

0 commit comments

Comments
 (0)