Summary: https://github.com/facebook/rocksdb/pull/7007 broken the unity build. Fix it by moving the const inside the function Pull Request resolved: https://github.com/facebook/rocksdb/pull/7024 Test Plan: make unity and see it to build. Reviewed By: zhichao-cao Differential Revision: D22212028 fbshipit-source-id: 5daff7383b691808164d4745ab543238502d946b
This commit is contained in:
parent
83a4dd1a67
commit
50d6969816
@ -19,8 +19,6 @@
|
|||||||
namespace ROCKSDB_NAMESPACE {
|
namespace ROCKSDB_NAMESPACE {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const unsigned int kCharSize = 1;
|
|
||||||
|
|
||||||
bool ShouldTrace(const Slice& block_key, const TraceOptions& trace_options) {
|
bool ShouldTrace(const Slice& block_key, const TraceOptions& trace_options) {
|
||||||
if (trace_options.sampling_frequency == 0 ||
|
if (trace_options.sampling_frequency == 0 ||
|
||||||
trace_options.sampling_frequency == 1) {
|
trace_options.sampling_frequency == 1) {
|
||||||
@ -217,6 +215,8 @@ Status BlockCacheTraceReader::ReadAccess(BlockCacheTraceRecord* record) {
|
|||||||
record->block_type = trace.type;
|
record->block_type = trace.type;
|
||||||
Slice enc_slice = Slice(trace.payload);
|
Slice enc_slice = Slice(trace.payload);
|
||||||
|
|
||||||
|
const unsigned int kCharSize = 1;
|
||||||
|
|
||||||
Slice block_key;
|
Slice block_key;
|
||||||
if (!GetLengthPrefixedSlice(&enc_slice, &block_key)) {
|
if (!GetLengthPrefixedSlice(&enc_slice, &block_key)) {
|
||||||
return Status::Incomplete(
|
return Status::Incomplete(
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
#include "util/string_util.h"
|
#include "util/string_util.h"
|
||||||
|
|
||||||
namespace ROCKSDB_NAMESPACE {
|
namespace ROCKSDB_NAMESPACE {
|
||||||
|
|
||||||
namespace {
|
|
||||||
const unsigned int kCharSize = 1;
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
IOTraceWriter::IOTraceWriter(Env* env, const TraceOptions& trace_options,
|
IOTraceWriter::IOTraceWriter(Env* env, const TraceOptions& trace_options,
|
||||||
std::unique_ptr<TraceWriter>&& trace_writer)
|
std::unique_ptr<TraceWriter>&& trace_writer)
|
||||||
: env_(env),
|
: env_(env),
|
||||||
@ -143,6 +138,7 @@ Status IOTraceReader::ReadIOOp(IOTraceRecord* record) {
|
|||||||
record->file_name = file_name.ToString();
|
record->file_name = file_name.ToString();
|
||||||
// TODO: Read below options based on file_operation.
|
// TODO: Read below options based on file_operation.
|
||||||
record->len = static_cast<size_t>(enc_slice[0]);
|
record->len = static_cast<size_t>(enc_slice[0]);
|
||||||
|
const unsigned int kCharSize = 1;
|
||||||
enc_slice.remove_prefix(kCharSize);
|
enc_slice.remove_prefix(kCharSize);
|
||||||
if (enc_slice.empty()) {
|
if (enc_slice.empty()) {
|
||||||
return Status::Incomplete(
|
return Status::Incomplete(
|
||||||
|
Loading…
Reference in New Issue
Block a user