Fix rebase issues and new code warnings.
This commit is contained in:
parent
3fa68af316
commit
a6fbdd64e0
@ -5243,11 +5243,11 @@ class RecoveryTestHelper {
|
|||||||
int fd = open(filename.c_str(), O_RDWR);
|
int fd = open(filename.c_str(), O_RDWR);
|
||||||
|
|
||||||
ASSERT_GT(fd, 0);
|
ASSERT_GT(fd, 0);
|
||||||
ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET));
|
ASSERT_EQ(offset, lseek(fd, static_cast<long>(offset), SEEK_SET));
|
||||||
|
|
||||||
void* buf = alloca(len);
|
void* buf = alloca(len);
|
||||||
memset(buf, 'a', len);
|
memset(buf, 'a', len);
|
||||||
ASSERT_EQ(len, write(fd, buf, len));
|
ASSERT_EQ(len, write(fd, buf, static_cast<unsigned int>(len)));
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
@ -687,7 +687,8 @@ void InternalStats::DumpCFStats(std::string* value) {
|
|||||||
comp_stats_[level].bytes_read_non_output_levels;
|
comp_stats_[level].bytes_read_non_output_levels;
|
||||||
PrintLevelStats(buf, sizeof(buf), "L" + ToString(level), files,
|
PrintLevelStats(buf, sizeof(buf), "L" + ToString(level), files,
|
||||||
files_being_compacted[level],
|
files_being_compacted[level],
|
||||||
vstorage->NumLevelBytes(level), compaction_score[level],
|
static_cast<double>(vstorage->NumLevelBytes(level)),
|
||||||
|
compaction_score[level],
|
||||||
w_amp, comp_stats_[level]);
|
w_amp, comp_stats_[level]);
|
||||||
value->append(buf);
|
value->append(buf);
|
||||||
}
|
}
|
||||||
|
@ -871,20 +871,17 @@ Version::Version(ColumnFamilyData* column_family_data, VersionSet* vset,
|
|||||||
refs_(0),
|
refs_(0),
|
||||||
version_number_(version_number) {}
|
version_number_(version_number) {}
|
||||||
|
|
||||||
void Version::Get(const ReadOptions& read_options, const LookupKey& k,
|
void Version::Get(const ReadOptions& read_options,
|
||||||
std::string* value, Status* status,
|
const LookupKey& k,
|
||||||
MergeContext* merge_context, bool* value_found,
|
std::string* value,
|
||||||
bool* key_exists, SequenceNumber* seq) {
|
Status* status,
|
||||||
|
MergeContext* merge_context,
|
||||||
|
bool* value_found) {
|
||||||
Slice ikey = k.internal_key();
|
Slice ikey = k.internal_key();
|
||||||
Slice user_key = k.user_key();
|
Slice user_key = k.user_key();
|
||||||
|
|
||||||
assert(status->ok() || status->IsMergeInProgress());
|
assert(status->ok() || status->IsMergeInProgress());
|
||||||
|
|
||||||
if (key_exists != nullptr) {
|
|
||||||
// will falsify below if not found
|
|
||||||
*key_exists = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetContext get_context(
|
GetContext get_context(
|
||||||
user_comparator(), merge_operator_, info_log_, db_statistics_,
|
user_comparator(), merge_operator_, info_log_, db_statistics_,
|
||||||
status->ok() ? GetContext::kNotFound : GetContext::kMerge, user_key,
|
status->ok() ? GetContext::kNotFound : GetContext::kMerge, user_key,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "rocksdb/status.h"
|
#include "rocksdb/status.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user