mirror of https://gitee.com/bigwinds/arangodb
added RocksDB version information, fixed comparator
This commit is contained in:
parent
40fa08abef
commit
66c0385fe0
|
@ -209,6 +209,11 @@ int RocksDBFeature::dropPrefix(std::string const& prefix) {
|
||||||
std::string l;
|
std::string l;
|
||||||
l.reserve(prefix.size() + builder.slice().byteSize());
|
l.reserve(prefix.size() + builder.slice().byteSize());
|
||||||
l.append(prefix);
|
l.append(prefix);
|
||||||
|
// extend the prefix to at least 24 bytes
|
||||||
|
while (l.size() < RocksDBIndex::keyPrefixSize()) {
|
||||||
|
uint64_t value = 0;
|
||||||
|
l.append(reinterpret_cast<char const*>(&value), sizeof(uint64_t));
|
||||||
|
}
|
||||||
l.append(builder.slice().startAs<char const>(), builder.slice().byteSize());
|
l.append(builder.slice().startAs<char const>(), builder.slice().byteSize());
|
||||||
|
|
||||||
builder.clear();
|
builder.clear();
|
||||||
|
@ -219,6 +224,11 @@ int RocksDBFeature::dropPrefix(std::string const& prefix) {
|
||||||
std::string u;
|
std::string u;
|
||||||
u.reserve(prefix.size() + builder.slice().byteSize());
|
u.reserve(prefix.size() + builder.slice().byteSize());
|
||||||
u.append(prefix);
|
u.append(prefix);
|
||||||
|
// extend the prefix to at least 24 bytes
|
||||||
|
while (u.size() < RocksDBIndex::keyPrefixSize()) {
|
||||||
|
uint64_t value = UINT64_MAX;
|
||||||
|
u.append(reinterpret_cast<char const*>(&value), sizeof(uint64_t));
|
||||||
|
}
|
||||||
u.append(builder.slice().startAs<char const>(), builder.slice().byteSize());
|
u.append(builder.slice().startAs<char const>(), builder.slice().byteSize());
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
#include "Basics/build-date.h"
|
#include "Basics/build-date.h"
|
||||||
#include "Basics/conversions.h"
|
#include "Basics/conversions.h"
|
||||||
|
|
||||||
|
#ifdef ARANGODB_ENABLE_ROCKSDB
|
||||||
|
#include <rocksdb/version.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace arangodb::rest;
|
using namespace arangodb::rest;
|
||||||
|
|
||||||
std::map<std::string, std::string> Version::Values;
|
std::map<std::string, std::string> Version::Values;
|
||||||
|
@ -105,6 +109,10 @@ void Version::initialize() {
|
||||||
Values["vpack-version"] = getVPackVersion();
|
Values["vpack-version"] = getVPackVersion();
|
||||||
Values["zlib-version"] = getZLibVersion();
|
Values["zlib-version"] = getZLibVersion();
|
||||||
|
|
||||||
|
#ifdef ARANGODB_ENABLE_ROCKSDB
|
||||||
|
Values["rocksdb-version"] = std::to_string(ROCKSDB_MAJOR) + "." + std::to_string(ROCKSDB_MINOR) + "." + std::to_string(ROCKSDB_PATCH);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
Values["cplusplus"] = std::to_string(__cplusplus);
|
Values["cplusplus"] = std::to_string(__cplusplus);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue