update cmake && remove useless codes

This commit is contained in:
sundy-li 2020-09-22 21:48:12 +08:00
parent 20315edae8
commit 1fa4906dd2
2 changed files with 6 additions and 18 deletions

View File

@ -2,22 +2,20 @@ option(ENABLE_ROCKSDB "Enable ROCKSDB" ${ENABLE_LIBRARIES})
option(USE_INTERNAL_ROCKSDB_LIBRARY "Set to FALSE to use system ROCKSDB library instead of bundled" ${NOT_UNBUNDLED})
if(ENABLE_ROCKSDB)
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rocksdb")
message (WARNING "submodule contrib is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_ROCKSDB_LIBRARY 0)
set (MISSING_ROCKSDB 1)
endif ()
if (USE_INTERNAL_ROCKSDB_LIBRARY AND NOT MISSING_ROCKSDB)
set (ROCKSDB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/rocksdb/include")
set (ROCKSDB_CORE_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/rocksdb/include")
set (ROCKSDB_LIBRARY "rocksdb")
set (USE_INTERNAL_ROCKSDB_LIBRARY 1)
set (USE_ROCKSDB 1)
else()
find_package(ROCKSDB)
endif ()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rocksdb/CMakeLists.txt")
message (WARNING "submodule contrib is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_ROCKSDB_LIBRARY 0)
set (MISSING_ROCKSDB 1)
endif ()
message (STATUS "Using ROCKSDB=${USE_ROCKSDB}: ${ROCKSDB_INCLUDE_DIR} : ${ROCKSDB_LIBRARY}")

View File

@ -132,16 +132,6 @@ public:
wb_value.restart();
}
rocksdb::Iterator* it = storage.rocksdb_ptr->rocksdb->NewIterator(rocksdb::ReadOptions());
for (it->SeekToFirst(); it->Valid(); it->Next())
{
LOG_DEBUG(&Poco::Logger::get("StorageEmbeddedRocksdb"), "Iterator `{}` returns `{}`, {}",
it->key().ToString(), it->value().ToString(), it->key().size());
}
// Check for any errors found during the scan
assert(it->status().ok());
delete it;
}
private: