@@ -708,8 +708,8 @@ void RocksDBEngine::start() {
708
708
addFamily (RocksDBColumnFamilyManager::Family::FulltextIndex);
709
709
addFamily (RocksDBColumnFamilyManager::Family::ReplicatedLogs);
710
710
711
- std::vector<rocksdb::ColumnFamilyHandle*> cfHandles;
712
- size_t const numberOfColumnFamilies = RocksDBColumnFamilyManager::minNumberOfColumnFamilies;
711
+
712
+ size_t const minNumberOfColumnFamilies = RocksDBColumnFamilyManager::minNumberOfColumnFamilies;
713
713
bool dbExisted = false ;
714
714
{
715
715
rocksdb::Options testOptions;
@@ -744,12 +744,21 @@ void Rocks
10000
DBEngine::start() {
744
744
745
745
LOG_TOPIC (" 528b8" , DEBUG, arangodb::Logger::STARTUP)
746
746
<< " found existing column families: " << names;
747
+ auto const replicatedLogsName = RocksDBColumnFamilyManager::name (
748
+ RocksDBColumnFamilyManager::Family::ReplicatedLogs);
747
749
748
750
for (auto const & it : cfFamilies) {
749
751
auto it2 = std::find (existingColumnFamilies.begin (),
750
752
existingColumnFamilies.end (), it.name );
751
-
752
753
if (it2 == existingColumnFamilies.end ()) {
754
+
755
+ if (it.name == replicatedLogsName) {
756
+ LOG_TOPIC (" 293c3" , INFO, Logger::STARTUP)
757
+ << " column family " << replicatedLogsName
758
+ << " is missing and will be created." ;
759
+ continue ;
760
+ }
761
+
753
762
LOG_TOPIC (" d9df8" , FATAL, arangodb::Logger::STARTUP)
754
763
<< " column family '" << it.name << " ' is missing in database"
755
764
<< " . if you are upgrading from an earlier alpha or beta version "
@@ -760,11 +769,11 @@ void RocksDBEngine::start() {
760
769
}
761
770
}
762
771
763
- if (existingColumnFamilies.size () < numberOfColumnFamilies ) {
772
+ if (existingColumnFamilies.size () < minNumberOfColumnFamilies ) {
764
773
LOG_TOPIC (" e99ec" , FATAL, arangodb::Logger::STARTUP)
765
774
<< " unexpected number of column families found in database ("
766
- << cfHandles .size () << " ). "
767
- << " expecting at least " << numberOfColumnFamilies
775
+ << existingColumnFamilies .size () << " ). "
776
+ << " expecting at least " << minNumberOfColumnFamilies
768
777
<< " . if you are upgrading from an earlier alpha or beta version "
769
778
" of ArangoDB 3.2, "
770
779
<< " it is required to restart with a new database directory and "
@@ -774,6 +783,7 @@ void RocksDBEngine::start() {
774
783
}
775
784
}
776
785
786
+ std::vector<rocksdb::ColumnFamilyHandle*> cfHandles;
777
787
rocksdb::Status status =
778
788
rocksdb::TransactionDB::Open (_options, transactionOptions, _path,
779
789
cfFamilies, &cfHandles, &_db);
@@ -795,10 +805,10
7B5D
@@ void RocksDBEngine::start() {
795
805
<< " unable to initialize RocksDB column families" ;
796
806
FATAL_ERROR_EXIT ();
797
807
}
798
- if (cfHandles.size () < numberOfColumnFamilies ) {
808
+ if (cfHandles.size () < minNumberOfColumnFamilies ) {
799
809
LOG_TOPIC (" e572e" , FATAL, arangodb::Logger::STARTUP)
800
810
<< " unexpected number of column families found in database. "
801
- << " got " << cfHandles.size () << " , expecting at least " << numberOfColumnFamilies ;
811
+ << " got " << cfHandles.size () << " , expecting at least " << minNumberOfColumnFamilies ;
802
812
FATAL_ERROR_EXIT ();
803
813
}
804
814
0 commit comments