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
main
Adam Retter 5 years ago committed by Facebook Github Bot
parent 9befbe9b40
commit a61ec9ae3b
  1. 4
      utilities/blob_db/blob_db_impl.cc
  2. 2
      utilities/blob_db/blob_file.cc
  3. 4
      utilities/blob_db/blob_file.h

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

@ -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 {
return BlobFileName(path_to_dir_, file_number_);

@ -116,7 +116,7 @@ class BlobFile {
~BlobFile();
uint32_t column_family_id() const;
uint32_t GetColumnFamilyId() const;
// Returns log file's absolute pathname.
std::string PathName() const;
@ -204,7 +204,7 @@ class BlobFile {
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_; }

Loading…
Cancel
Save