From c489499a2b4b3670d2e110588f9e1acfa00119dc Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Sat, 26 Apr 2014 17:15:43 -0400 Subject: [PATCH 1/2] Fix OSX compile --- db/version_set.h | 2 +- table/block_based_table_reader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/version_set.h b/db/version_set.h index c8297f8ec..13a138341 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -219,7 +219,7 @@ class Version { friend class UniversalCompactionPicker; class LevelFileNumIterator; - struct LevelFileIteratorState; + class LevelFileIteratorState; bool PrefixMayMatch(const ReadOptions& options, Iterator* level_iter, const Slice& internal_prefix) const; diff --git a/table/block_based_table_reader.h b/table/block_based_table_reader.h index fbe47272e..f68d6423d 100644 --- a/table/block_based_table_reader.h +++ b/table/block_based_table_reader.h @@ -111,7 +111,7 @@ class BlockBasedTable : public TableReader { Rep* rep_; bool compaction_optimized_; - struct BlockEntryIteratorState; + class BlockEntryIteratorState; static Iterator* NewDataBlockIterator(Rep* rep, const ReadOptions& ro, bool* didIO, const Slice& index_value); From fe331c88866b5876db72629db73511053c7c6884 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Sat, 26 Apr 2014 14:21:39 -0700 Subject: [PATCH 2/2] fix valgrind --- utilities/backupable/backupable_db.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index ca1fb504a..a11720165 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -1134,9 +1134,9 @@ Status BackupEngineImpl::BackupMeta::StoreToFile(bool sync) { // -------- BackupEngineReadOnlyImpl --------- class BackupEngineReadOnlyImpl : public BackupEngineReadOnly { public: - BackupEngineReadOnlyImpl(Env* db_env, const BackupableDBOptions& options) { - backup_engine_ = new BackupEngineImpl(db_env, options, true); - } + BackupEngineReadOnlyImpl(Env* db_env, const BackupableDBOptions& options) + : backup_engine_(new BackupEngineImpl(db_env, options, true)) {} + virtual ~BackupEngineReadOnlyImpl() {} virtual void GetBackupInfo(std::vector* backup_info) { @@ -1158,7 +1158,7 @@ class BackupEngineReadOnlyImpl : public BackupEngineReadOnly { } private: - BackupEngineImpl* backup_engine_; + std::unique_ptr backup_engine_; }; BackupEngineReadOnly* BackupEngineReadOnly::NewReadOnlyBackupEngine(