Fix another rebase problems.
This commit is contained in:
parent
a6fbdd64e0
commit
aca403d2b5
@ -3214,7 +3214,6 @@ class Benchmark {
|
|||||||
if (thread->tid > 0) {
|
if (thread->tid > 0) {
|
||||||
ReadRandom(thread);
|
ReadRandom(thread);
|
||||||
} else {
|
} else {
|
||||||
BGWriter(thread, kPut);
|
|
||||||
BGWriter(thread, kWrite);
|
BGWriter(thread, kWrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -757,7 +757,7 @@ uint64_t VersionStorageInfo::GetEstimatedActiveKeys() const {
|
|||||||
// casting to avoid overflowing
|
// casting to avoid overflowing
|
||||||
return
|
return
|
||||||
static_cast<uint64_t>(
|
static_cast<uint64_t>(
|
||||||
(est * static_cast<double>(file_count) / current_num_samples_);
|
(est * static_cast<double>(file_count) / current_num_samples_)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return est;
|
return est;
|
||||||
@ -871,21 +871,24 @@ 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,
|
void Version::Get(const ReadOptions& read_options, const LookupKey& k,
|
||||||
const LookupKey& k,
|
std::string* value, Status* status,
|
||||||
std::string* value,
|
MergeContext* merge_context, bool* value_found,
|
||||||
Status* status,
|
bool* key_exists, SequenceNumber* seq) {
|
||||||
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,
|
||||||
value, value_found, merge_context, this->env_);
|
value, value_found, merge_context, this->env_, seq);
|
||||||
|
|
||||||
FilePicker fp(
|
FilePicker fp(
|
||||||
storage_info_.files_, user_key, ikey, &storage_info_.level_files_brief_,
|
storage_info_.files_, user_key, ikey, &storage_info_.level_files_brief_,
|
||||||
|
@ -60,7 +60,7 @@ class GenericRateLimiter : public RateLimiter {
|
|||||||
private:
|
private:
|
||||||
void Refill();
|
void Refill();
|
||||||
int64_t CalculateRefillBytesPerPeriod(int64_t rate_bytes_per_sec) {
|
int64_t CalculateRefillBytesPerPeriod(int64_t rate_bytes_per_sec) {
|
||||||
return static_cast<int64_t>(rate_bytes_per_sec * refill_period_us_ / 1000000.0);
|
return rate_bytes_per_sec * refill_period_us_ / 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This mutex guard all internal states
|
// This mutex guard all internal states
|
||||||
|
Loading…
x
Reference in New Issue
Block a user