Fix BlobDB compilation on older GCC versions

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6094

Differential Revision: D18731951

Pulled By: ltamasi

fbshipit-source-id: 5b73c6009c748f6a2a48d4d880b1259980d801d4
This commit is contained in:
Adam Retter 2019-11-27 13:07:28 -08:00 committed by Levi Tamasi
parent 880e30a8b1
commit 4d26e7550a
3 changed files with 5 additions and 5 deletions

View File

@ -975,7 +975,7 @@ Status BlobDBImpl::PutBlobValue(const WriteOptions& /*options*/,
} }
if (s.ok()) { if (s.ok()) {
assert(blob_file != nullptr); assert(blob_file != nullptr);
assert(blob_file->compression() == bdb_options_.compression); assert(blob_file->GetCompressionType() == bdb_options_.compression);
s = AppendBlob(blob_file, headerbuf, key, value_compressed, expiration, s = AppendBlob(blob_file, headerbuf, key, value_compressed, expiration,
&index_entry); &index_entry);
} }
@ -1364,7 +1364,7 @@ Status BlobDBImpl::GetRawBlobFromFile(const Slice& key, uint64_t file_number,
blob_file = it->second; blob_file = it->second;
} }
*compression_type = blob_file->compression(); *compression_type = blob_file->GetCompressionType();
// takes locks when called // takes locks when called
std::shared_ptr<RandomAccessFileReader> reader; std::shared_ptr<RandomAccessFileReader> reader;

View File

@ -54,7 +54,7 @@ BlobFile::~BlobFile() {
} }
} }
uint32_t BlobFile::column_family_id() const { return column_family_id_; } uint32_t BlobFile::GetColumnFamilyId() const { return column_family_id_; }
std::string BlobFile::PathName() const { std::string BlobFile::PathName() const {
return BlobFileName(path_to_dir_, file_number_); return BlobFileName(path_to_dir_, file_number_);

View File

@ -116,7 +116,7 @@ class BlobFile {
~BlobFile(); ~BlobFile();
uint32_t column_family_id() const; uint32_t GetColumnFamilyId() const;
// Returns log file's absolute pathname. // Returns log file's absolute pathname.
std::string PathName() const; std::string PathName() const;
@ -204,7 +204,7 @@ class BlobFile {
void SetHasTTL(bool has_ttl) { has_ttl_ = has_ttl; } void SetHasTTL(bool has_ttl) { has_ttl_ = has_ttl; }
CompressionType compression() const { return compression_; } CompressionType GetCompressionType() const { return compression_; }
std::shared_ptr<Writer> GetWriter() const { return log_writer_; } std::shared_ptr<Writer> GetWriter() const { return log_writer_; }