提交 83031e73 编写于 作者: A Akanksha Mahajan 提交者: Facebook GitHub Bot

Fix for LITE mode failure on MacOS (#8189)

Summary:
Fix for failure to build in LITE mode on MacOs from
BlobFileCompletionCallback unused private fields.

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

Reviewed By: jay-zhuang

Differential Revision: D27768341

Pulled By: akankshamahajan15

fbshipit-source-id: 14d31d7a9b52d308d9f9f27feff1977c5550622f
上级 296b47db
...@@ -306,7 +306,6 @@ Status BlobFileBuilder::CloseBlobFile() { ...@@ -306,7 +306,6 @@ Status BlobFileBuilder::CloseBlobFile() {
" total blobs, %" PRIu64 " total bytes", " total blobs, %" PRIu64 " total bytes",
column_family_name_.c_str(), job_id_, blob_file_number, column_family_name_.c_str(), job_id_, blob_file_number,
blob_count_, blob_bytes_); blob_count_, blob_bytes_);
if (blob_callback_) { if (blob_callback_) {
s = blob_callback_->OnBlobFileCompleted(blob_file_paths_->back()); s = blob_callback_->OnBlobFileCompleted(blob_file_paths_->back());
} }
......
...@@ -16,6 +16,14 @@ namespace ROCKSDB_NAMESPACE { ...@@ -16,6 +16,14 @@ namespace ROCKSDB_NAMESPACE {
class BlobFileCompletionCallback { class BlobFileCompletionCallback {
public: public:
#ifdef ROCKSDB_LITE
BlobFileCompletionCallback(SstFileManager* /*sst_file_manager*/,
InstrumentedMutex* /*mutex*/,
ErrorHandler* /*error_handler*/) {}
Status OnBlobFileCompleted(const std::string& /*file_name*/) {
return Status::OK();
}
#else
BlobFileCompletionCallback(SstFileManager* sst_file_manager, BlobFileCompletionCallback(SstFileManager* sst_file_manager,
InstrumentedMutex* mutex, InstrumentedMutex* mutex,
ErrorHandler* error_handler) ErrorHandler* error_handler)
...@@ -25,8 +33,6 @@ class BlobFileCompletionCallback { ...@@ -25,8 +33,6 @@ class BlobFileCompletionCallback {
Status OnBlobFileCompleted(const std::string& file_name) { Status OnBlobFileCompleted(const std::string& file_name) {
Status s; Status s;
#ifndef ROCKSDB_LITE
auto sfm = static_cast<SstFileManagerImpl*>(sst_file_manager_); auto sfm = static_cast<SstFileManagerImpl*>(sst_file_manager_);
if (sfm) { if (sfm) {
// Report new blob files to SstFileManagerImpl // Report new blob files to SstFileManagerImpl
...@@ -39,9 +45,6 @@ class BlobFileCompletionCallback { ...@@ -39,9 +45,6 @@ class BlobFileCompletionCallback {
error_handler_->SetBGError(s, BackgroundErrorReason::kFlush); error_handler_->SetBGError(s, BackgroundErrorReason::kFlush);
} }
} }
#else
(void)file_name;
#endif // ROCKSDB_LITE
return s; return s;
} }
...@@ -49,5 +52,6 @@ class BlobFileCompletionCallback { ...@@ -49,5 +52,6 @@ class BlobFileCompletionCallback {
SstFileManager* sst_file_manager_; SstFileManager* sst_file_manager_;
InstrumentedMutex* mutex_; InstrumentedMutex* mutex_;
ErrorHandler* error_handler_; ErrorHandler* error_handler_;
#endif // ROCKSDB_LITE
}; };
} // namespace ROCKSDB_NAMESPACE } // namespace ROCKSDB_NAMESPACE
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册