1
0
Fork 0

workaround for compile issue

This commit is contained in:
jsteemann 2017-05-29 13:02:22 +02:00
parent c02699d10e
commit c7e1877fd6
1 changed files with 6 additions and 5 deletions

View File

@ -310,6 +310,7 @@ void RocksDBEngine::start() {
// DO NOT FORGET TO DESTROY THE CFs ON CLOSE // DO NOT FORGET TO DESTROY THE CFs ON CLOSE
std::vector<rocksdb::ColumnFamilyHandle*> cfHandles; std::vector<rocksdb::ColumnFamilyHandle*> cfHandles;
size_t const numberOfColumnFamilies = RocksDBColumnFamily::numberOfColumnFamilies;
{ {
rocksdb::Options testOptions; rocksdb::Options testOptions;
testOptions.create_if_missing = false; testOptions.create_if_missing = false;
@ -340,10 +341,10 @@ void RocksDBEngine::start() {
LOG_TOPIC(DEBUG, arangodb::Logger::STARTUP) << "found existing column families: " << names; LOG_TOPIC(DEBUG, arangodb::Logger::STARTUP) << "found existing column families: " << names;
if (existingColumnFamilies.size() < RocksDBColumnFamily::numberOfColumnFamilies) { if (existingColumnFamilies.size() < numberOfColumnFamilies) {
LOG_TOPIC(FATAL, arangodb::Logger::STARTUP) LOG_TOPIC(FATAL, arangodb::Logger::STARTUP)
<< "unexpected number of column families found in database (" << cfHandles.size() << "). " << "unexpected number of column families found in database (" << cfHandles.size() << "). "
<< "expecting at least " << RocksDBColumnFamily::numberOfColumnFamilies << "expecting at least " << numberOfColumnFamilies
<< ". if you are upgrading from an alpha version of ArangoDB 3.2, " << ". if you are upgrading from an alpha version of ArangoDB 3.2, "
<< "it is required to restart with a new database directory and re-import data"; << "it is required to restart with a new database directory and re-import data";
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
@ -365,14 +366,14 @@ void RocksDBEngine::start() {
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }
if (cfHandles.size() < RocksDBColumnFamily::numberOfColumnFamilies) { if (cfHandles.size() < numberOfColumnFamilies) {
LOG_TOPIC(FATAL, arangodb::Logger::STARTUP) LOG_TOPIC(FATAL, arangodb::Logger::STARTUP)
<< "unexpected number of column families found in database. " << "unexpected number of column families found in database. "
<< "got " << cfHandles.size() << ", expecting at least " << RocksDBColumnFamily::numberOfColumnFamilies; << "got " << cfHandles.size() << ", expecting at least " << numberOfColumnFamilies;
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }
TRI_ASSERT(cfHandles.size() >= RocksDBColumnFamily::numberOfColumnFamilies); TRI_ASSERT(cfHandles.size() >= numberOfColumnFamilies);
// set our column families // set our column families
RocksDBColumnFamily::_other = cfHandles[0]; RocksDBColumnFamily::_other = cfHandles[0];