fix memory leak in two_level_iterator

Summary:
this PR fixes a few failed contbuild:
1. ASAN memory leak in Block::NewIterator (table/block.cc:429). the proper destruction of first_level_iter_ and second_level_iter_ of two_level_iterator.cc is missing from the code after the refactoring in https://github.com/facebook/rocksdb/pull/3406
2. various unused param errors introduced by https://github.com/facebook/rocksdb/pull/3662
3. updated comment for `ForceReleaseCachedEntry` to emphasize the use of `force_erase` flag.
Closes https://github.com/facebook/rocksdb/pull/3718

Reviewed By: maysamyabandeh

Differential Revision: D7621192

Pulled By: miasantreble

fbshipit-source-id: 476c94264083a0730ded957c29de7807e4f5b146
This commit is contained in:
Zhongyi Xie 2018-04-15 17:19:57 -07:00 committed by Maysam Yabandeh
parent dcb7f3bdae
commit 43f2a27daf
53 changed files with 89 additions and 57 deletions

View File

@ -383,6 +383,9 @@ class ColumnFamilyTest : public testing::Test {
void AssertFilesPerLevel(const std::string& value, int cf) { void AssertFilesPerLevel(const std::string& value, int cf) {
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
ASSERT_EQ(value, FilesPerLevel(cf)); ASSERT_EQ(value, FilesPerLevel(cf));
#else
(void) value;
(void) cf;
#endif #endif
} }
@ -397,6 +400,8 @@ class ColumnFamilyTest : public testing::Test {
void AssertCountLiveFiles(int expected_value) { void AssertCountLiveFiles(int expected_value) {
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
ASSERT_EQ(expected_value, CountLiveFiles()); ASSERT_EQ(expected_value, CountLiveFiles());
#else
(void) expected_value;
#endif #endif
} }
@ -445,6 +450,8 @@ class ColumnFamilyTest : public testing::Test {
void AssertCountLiveLogFiles(int value) { void AssertCountLiveLogFiles(int value) {
#ifndef ROCKSDB_LITE // GetSortedWalFiles is not supported #ifndef ROCKSDB_LITE // GetSortedWalFiles is not supported
ASSERT_EQ(value, CountLiveLogFiles()); ASSERT_EQ(value, CountLiveLogFiles());
#else
(void) value;
#endif // !ROCKSDB_LITE #endif // !ROCKSDB_LITE
} }

View File

@ -318,7 +318,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as DBImpl::CompactFiles is not supported in ROCKSDB_LITE\n"); "SKIPPED as DBImpl::CompactFiles is not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -1034,7 +1034,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED, not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED, not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }
@ -1043,5 +1043,5 @@ int main(int argc, char** argv) {
#else #else
int main(int argc, char** argv) { return 0; } int main(int /*argc*/, char** /*argv*/) { return 0; }
#endif // !defined(IOS_CROSS_COMPILE) #endif // !defined(IOS_CROSS_COMPILE)

View File

@ -946,7 +946,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as CompactionJobStats is not supported in ROCKSDB_LITE\n"); "SKIPPED as CompactionJobStats is not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -510,7 +510,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as RepairDB() is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as RepairDB() is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -333,7 +333,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -3549,6 +3549,8 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#else #else
(void) argc;
(void) argv;
return 0; return 0;
#endif #endif
} }

View File

@ -501,6 +501,8 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#else #else
(void) argc;
(void) argv;
return 0; return 0;
#endif #endif
} }

View File

@ -289,6 +289,8 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#else #else
(void) argc;
(void) argv;
return 0; return 0;
#endif #endif
} }

View File

@ -809,6 +809,8 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#else #else
(void) argc;
(void) argv;
return 0; return 0;
#endif #endif
} }

View File

@ -1759,6 +1759,8 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#else #else
(void) argc;
(void) argv;
return 0; return 0;
#endif #endif
} }

View File

@ -500,7 +500,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as DBImpl::DeleteFile is not supported in ROCKSDB_LITE\n"); "SKIPPED as DBImpl::DeleteFile is not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -2006,7 +2006,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as External SST File Writer and Ingestion are not supported " "SKIPPED as External SST File Writer and Ingestion are not supported "
"in ROCKSDB_LITE\n"); "in ROCKSDB_LITE\n");

View File

@ -208,7 +208,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as DBImpl::DeleteFile is not supported in ROCKSDB_LITE\n"); "SKIPPED as DBImpl::DeleteFile is not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -112,7 +112,7 @@ int main(int argc, char** argv) {
#include <cstdio> #include <cstdio>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
printf("Skipped as Options file is not supported in RocksDBLite.\n"); printf("Skipped as Options file is not supported in RocksDBLite.\n");
return 0; return 0;
} }

View File

@ -1170,7 +1170,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as plain table is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as plain table is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -887,7 +887,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as HashSkipList and HashLinkList are not supported in " "SKIPPED as HashSkipList and HashLinkList are not supported in "
"ROCKSDB_LITE\n"); "ROCKSDB_LITE\n");

View File

@ -356,7 +356,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as RepairDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as RepairDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -303,7 +303,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as WalManager is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as WalManager is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -432,7 +432,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as WriteWithCallback is not supported in ROCKSDB_LITE\n"); "SKIPPED as WriteWithCallback is not supported in ROCKSDB_LITE\n");
return 0; return 0;

8
env/io_posix.cc vendored
View File

@ -873,8 +873,12 @@ void PosixWritableFile::SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) {
if (fcntl(fd_, F_SET_RW_HINT, &hint) == 0) { if (fcntl(fd_, F_SET_RW_HINT, &hint) == 0) {
write_hint_ = hint; write_hint_ = hint;
} }
#endif #else
#endif (void)hint;
#endif // ROCKSDB_VALGRIND_RUN
#else
(void)hint;
#endif // OS_LINUX
} }
Status PosixWritableFile::InvalidateCache(size_t offset, size_t length) { Status PosixWritableFile::InvalidateCache(size_t offset, size_t length) {

View File

@ -120,7 +120,7 @@ void ReleaseCachedEntry(void* arg, void* h) {
void ForceReleaseCachedEntry(void* arg, void* h) { void ForceReleaseCachedEntry(void* arg, void* h) {
Cache* cache = reinterpret_cast<Cache*>(arg); Cache* cache = reinterpret_cast<Cache*>(arg);
Cache::Handle* handle = reinterpret_cast<Cache::Handle*>(h); Cache::Handle* handle = reinterpret_cast<Cache::Handle*>(h);
cache->Release(handle, true); cache->Release(handle, true /* force_erase */);
} }
Slice GetCacheKeyFromOffset(const char* cache_key_prefix, Slice GetCacheKeyFromOffset(const char* cache_key_prefix,

View File

@ -625,7 +625,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -560,7 +560,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as Cuckoo table is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -24,7 +24,11 @@ class TwoLevelIterator : public InternalIterator {
explicit TwoLevelIterator(TwoLevelIteratorState* state, explicit TwoLevelIterator(TwoLevelIteratorState* state,
InternalIterator* first_level_iter); InternalIterator* first_level_iter);
virtual ~TwoLevelIterator() { delete state_; } virtual ~TwoLevelIterator() {
first_level_iter_.DeleteIter(false /* is_arena_mode */);
second_level_iter_.DeleteIter(false /* is_arena_mode */);
delete state_;
}
virtual void Seek(const Slice& target) override; virtual void Seek(const Slice& target) override;
virtual void SeekForPrev(const Slice& target) override; virtual void SeekForPrev(const Slice& target) override;

View File

@ -16,8 +16,8 @@ namespace rocksdb {
struct ReadOptions; struct ReadOptions;
class InternalKeyComparator; class InternalKeyComparator;
class Arena;
// TwoLevelIteratorState expects iterators are not created using the arena
struct TwoLevelIteratorState { struct TwoLevelIteratorState {
TwoLevelIteratorState() {} TwoLevelIteratorState() {}
@ -35,11 +35,7 @@ struct TwoLevelIteratorState {
// //
// Uses a supplied function to convert an index_iter value into // Uses a supplied function to convert an index_iter value into
// an iterator over the contents of the corresponding block. // an iterator over the contents of the corresponding block.
// arena: If not null, the arena is used to allocate the Iterator. // Note: this function expects first_level_iter was not created using the arena
// When destroying the iterator, the destructor will destroy
// all the states but those allocated in arena.
// need_free_iter_and_state: free `state` and `first_level_iter` if
// true. Otherwise, just call destructor.
extern InternalIterator* NewTwoLevelIterator( extern InternalIterator* NewTwoLevelIterator(
TwoLevelIteratorState* state, InternalIterator* first_level_iter); TwoLevelIteratorState* state, InternalIterator* first_level_iter);

View File

@ -2944,6 +2944,8 @@ void VerifyDBFromDB(std::string& truth_db_name) {
FLAGS_options_file.c_str(), s.ToString().c_str()); FLAGS_options_file.c_str(), s.ToString().c_str());
exit(1); exit(1);
} }
#else
(void)opts;
#endif #endif
return false; return false;
} }
@ -4000,6 +4002,9 @@ void VerifyDBFromDB(std::string& truth_db_name) {
} }
return Status::OK(); return Status::OK();
#else #else
(void)thread;
(void)compaction_style;
(void)write_mode;
fprintf(stderr, "Rocksdb Lite doesn't support filldeterministic\n"); fprintf(stderr, "Rocksdb Lite doesn't support filldeterministic\n");
return Status::NotSupported( return Status::NotSupported(
"Rocksdb Lite doesn't support filldeterministic"); "Rocksdb Lite doesn't support filldeterministic");

View File

@ -1021,9 +1021,7 @@ class DbStressListener : public EventListener {
: db_name_(db_name), db_paths_(db_paths) {} : db_name_(db_name), db_paths_(db_paths) {}
virtual ~DbStressListener() {} virtual ~DbStressListener() {}
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
virtual void OnFlushCompleted(DB* db, const FlushJobInfo& info) override { virtual void OnFlushCompleted(DB* /*db*/, const FlushJobInfo& info) override {
assert(db);
assert(db->GetName() == db_name_);
assert(IsValidColumnFamilyName(info.cf_name)); assert(IsValidColumnFamilyName(info.cf_name));
VerifyFilePath(info.file_path); VerifyFilePath(info.file_path);
// pretending doing some work here // pretending doing some work here
@ -1031,10 +1029,8 @@ class DbStressListener : public EventListener {
std::chrono::microseconds(Random::GetTLSInstance()->Uniform(5000))); std::chrono::microseconds(Random::GetTLSInstance()->Uniform(5000)));
} }
virtual void OnCompactionCompleted(DB* db, virtual void OnCompactionCompleted(DB* /*db*/,
const CompactionJobInfo& ci) override { const CompactionJobInfo& ci) override {
assert(db);
assert(db->GetName() == db_name_);
assert(IsValidColumnFamilyName(ci.cf_name)); assert(IsValidColumnFamilyName(ci.cf_name));
assert(ci.input_files.size() + ci.output_files.size() > 0U); assert(ci.input_files.size() + ci.output_files.size() > 0U);
for (const auto& file_path : ci.input_files) { for (const auto& file_path : ci.input_files) {
@ -1086,6 +1082,8 @@ class DbStressListener : public EventListener {
} }
} }
assert(false); assert(false);
#else
(void)file_dir;
#endif // !NDEBUG #endif // !NDEBUG
} }
@ -1096,6 +1094,8 @@ class DbStressListener : public EventListener {
bool result = ParseFileName(file_name, &file_number, &file_type); bool result = ParseFileName(file_name, &file_number, &file_type);
assert(result); assert(result);
assert(file_type == kTableFile); assert(file_type == kTableFile);
#else
(void)file_name;
#endif // !NDEBUG #endif // !NDEBUG
} }
@ -1110,6 +1110,8 @@ class DbStressListener : public EventListener {
} }
VerifyFileName(file_path.substr(pos)); VerifyFileName(file_path.substr(pos));
} }
#else
(void)file_path;
#endif // !NDEBUG #endif // !NDEBUG
} }
#endif // !ROCKSDB_LITE #endif // !ROCKSDB_LITE
@ -2289,6 +2291,7 @@ class StressTest {
size_t value_sz = size_t value_sz =
((rand % kRandomValueMaxFactor) + 1) * FLAGS_value_size_mult; ((rand % kRandomValueMaxFactor) + 1) * FLAGS_value_size_mult;
assert(value_sz <= max_sz && value_sz >= sizeof(uint32_t)); assert(value_sz <= max_sz && value_sz >= sizeof(uint32_t));
(void) max_sz;
*((uint32_t*)v) = rand; *((uint32_t*)v) = rand;
for (size_t i=sizeof(uint32_t); i < value_sz; i++) { for (size_t i=sizeof(uint32_t); i < value_sz; i++) {
v[i] = (char)(rand ^ i); v[i] = (char)(rand ^ i);

View File

@ -54,7 +54,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as LDBCommand is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as LDBCommand is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -210,7 +210,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as LDBCommand is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as LDBCommand is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -215,7 +215,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as SSTDumpTool is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as SSTDumpTool is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -520,7 +520,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as AutoRollLogger is not supported in ROCKSDB_LITE\n"); "SKIPPED as AutoRollLogger is not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -27,6 +27,9 @@ template <class T>
void AssertAutoVectorOnlyInStack(autovector<T, kSize>* vec, bool result) { void AssertAutoVectorOnlyInStack(autovector<T, kSize>* vec, bool result) {
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
ASSERT_EQ(vec->only_in_stack(), result); ASSERT_EQ(vec->only_in_stack(), result);
#else
(void) vec;
(void) result;
#endif // !ROCKSDB_LITE #endif // !ROCKSDB_LITE
} }
} // namespace } // namespace

View File

@ -641,7 +641,7 @@ int main(int argc, char** argv) {
} }
#else #else
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
printf("DeleteScheduler is not supported in ROCKSDB_LITE\n"); printf("DeleteScheduler is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -1589,7 +1589,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as BackupableDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as BackupableDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -1544,7 +1544,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as BlobDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as BlobDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -596,7 +596,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as Checkpoint is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as Checkpoint is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -169,7 +169,7 @@ int main() {
} }
#endif // GFLAGS #endif // GFLAGS
#else #else
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "Not supported in lite mode.\n"); fprintf(stderr, "Not supported in lite mode.\n");
return 1; return 1;
} }

View File

@ -460,7 +460,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as DateTieredDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as DateTieredDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -328,7 +328,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as DocumentDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as DocumentDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -333,7 +333,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as JSONDocument is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as JSONDocument is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -36,7 +36,7 @@ int main(int argc, char** argv) {
#else // ROCKSDB_LITE #else // ROCKSDB_LITE
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as TimedEnv is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as TimedEnv is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -491,7 +491,7 @@ int main(int argc, char** argv) {
#else #else
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
printf("Lua is not supported in RocksDBLite. Ignoring the test.\n"); printf("Lua is not supported in RocksDBLite. Ignoring the test.\n");
} }

View File

@ -269,7 +269,7 @@ int main(int argc, char** argv) {
#else #else
#include <cstdio> #include <cstdio>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
printf("Skipped in RocksDBLite as utilities are not supported.\n"); printf("Skipped in RocksDBLite as utilities are not supported.\n");
return 0; return 0;
} }

View File

@ -65,7 +65,7 @@ int main(int argc, char** argv) {
#else // ROCKSDB_LITE #else // ROCKSDB_LITE
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as EnvRegistry is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as EnvRegistry is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -311,7 +311,7 @@ int main(int argc, char** argv) {
#else #else
#include <cstdio> #include <cstdio>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
printf("Skipped in RocksDBLite as utilities are not supported.\n"); printf("Skipped in RocksDBLite as utilities are not supported.\n");
return 0; return 0;
} }

View File

@ -886,7 +886,7 @@ int main(int argc, char* argv[]) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char* argv[]) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as redis is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as redis is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -299,7 +299,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as SpatialDB is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as SpatialDB is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }

View File

@ -171,7 +171,7 @@ int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "PASSED\n"); fprintf(stderr, "PASSED\n");
} }
#else #else
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as RocksDBLite does not include utilities.\n"); fprintf(stderr, "SKIPPED as RocksDBLite does not include utilities.\n");
return 0; return 0;
} }

View File

@ -1391,7 +1391,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf( fprintf(
stderr, stderr,
"SKIPPED as optimistic_transaction is not supported in ROCKSDB_LITE\n"); "SKIPPED as optimistic_transaction is not supported in ROCKSDB_LITE\n");

View File

@ -5566,7 +5566,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as Transactions are not supported in ROCKSDB_LITE\n"); "SKIPPED as Transactions are not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -2048,7 +2048,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, fprintf(stderr,
"SKIPPED as Transactions are not supported in ROCKSDB_LITE\n"); "SKIPPED as Transactions are not supported in ROCKSDB_LITE\n");
return 0; return 0;

View File

@ -655,7 +655,7 @@ int main(int argc, char** argv) {
#else #else
#include <stdio.h> #include <stdio.h>
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
fprintf(stderr, "SKIPPED as DBWithTTL is not supported in ROCKSDB_LITE\n"); fprintf(stderr, "SKIPPED as DBWithTTL is not supported in ROCKSDB_LITE\n");
return 0; return 0;
} }