From f813279da553b7fa449f5aa1e80fa941db2498d4 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 21 Apr 2014 11:08:30 -0700 Subject: [PATCH] Remove TransactionLogIteratorRace when -DNDEBUG --- db/db_test.cc | 2 ++ db/file_indexer.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index c9578a65ac..f2c665af3f 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -5441,6 +5441,7 @@ TEST(DBTest, TransactionLogIterator) { } while (ChangeCompactOptions()); } +#ifndef NDEBUG // sync point is not included with DNDEBUG build TEST(DBTest, TransactionLogIteratorRace) { // Setup sync point dependency to reproduce the race condition of // a log file moved to archived dir, in the middle of GetSortedWalFiles @@ -5485,6 +5486,7 @@ TEST(DBTest, TransactionLogIteratorRace) { } } while (ChangeCompactOptions()); } +#endif TEST(DBTest, TransactionLogIteratorMoveOverZeroFiles) { do { diff --git a/db/file_indexer.h b/db/file_indexer.h index a42fb04091..5e405dfe9d 100644 --- a/db/file_indexer.h +++ b/db/file_indexer.h @@ -16,7 +16,7 @@ namespace rocksdb { class Comparator; -class FileMetaData; +struct FileMetaData; // The file tree structure in Version is prebuilt and the range of each file // is known. On Version::Get(), it uses binary search to find a potential file