1
0
Fork 0

added RocksDB version information, fixed comparator

This commit is contained in:
Jan Steemann 2016-05-27 12:58:26 +02:00
parent 40fa08abef
commit 66c0385fe0
2 changed files with 18 additions and 0 deletions

View File

@ -209,6 +209,11 @@ int RocksDBFeature::dropPrefix(std::string const& prefix) {
std::string l;
l.reserve(prefix.size() + builder.slice().byteSize());
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());
builder.clear();
@ -219,6 +224,11 @@ int RocksDBFeature::dropPrefix(std::string const& prefix) {
std::string u;
u.reserve(prefix.size() + builder.slice().byteSize());
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());
#if 0

View File

@ -39,6 +39,10 @@
#include "Basics/build-date.h"
#include "Basics/conversions.h"
#ifdef ARANGODB_ENABLE_ROCKSDB
#include <rocksdb/version.h>
#endif
using namespace arangodb::rest;
std::map<std::string, std::string> Version::Values;
@ -105,6 +109,10 @@ void Version::initialize() {
Values["vpack-version"] = getVPackVersion();
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
Values["cplusplus"] = std::to_string(__cplusplus);
#else