mongodb-partners/mongo-rocks

[err] upgrading: mongo 3.2.9 -> 3.2.11 & rocksdb 4.9 -> 4.11.2

Closed this issue · 1 comments

Hi,

I am getting an error while upgrading mongodb to 3.2.11, mongo-rocks to 3.2.11 & rocksdb to 4.11.2.

I am running the following script:

#!/bin/sh

# miscellaneous
apt-get update
apt-get install -y build-essential git binutils

# RocksDB
apt-get update
apt-get install -y libbz2-dev libsnappy-dev zlib1g-dev libzlcore-dev

git clone https://github.com/facebook/rocksdb.git
cd rocksdb
git checkout tags/v4.11.2
CXXFLAGS="-flto -Os -s" make -j$(nproc) shared_lib
make install

# MongoDB
apt-get update
apt-get install -y scons
git clone https://github.com/mongodb-partners/mongo-rocks.git /mongo-rocks
cd /mongo-rocks
git checkout tags/r3.2.11
git clone https://github.com/mongodb/mongo.git /mongo
cd /mongo
git checkout tags/r3.2.11
mkdir -p src/mongo/db/modules/
ln -sf /mongo-rocks src/mongo/db/modules/rocks
CXXFLAGS="-flto -Os -s" scons CPPPATH=/usr/local/include LIBPATH=/usr/local/lib -j$(nproc) --release --prefix=/usr --opt core  install

# purge
strip /usr/bin/mongo
strip /usr/bin/mongod
strip /usr/bin/mongos
strip /usr/bin/mongoperf
apt-get -y --purge autoremove build-essential git scons binutils
rm -rf /rocksdb
rm -rf /mongo-rocks
rm -rf /mongo
rm -f /usr/local/lib/librocksdb.a

And i am getting the following error:

src/mongo/db/modules/rocks/src/rocks_engine.cpp: In member function 'virtual mongo::RecordStore* mongo::RocksEngine::getRecordStore(mongo::OperationContext*, mongo::StringData, mongo::StringData, const mongo::CollectionOptions&)':
src/mongo/db/modules/rocks/src/rocks_engine.cpp:355:73: error: invalid new-expression of abstract class type 'mongo::RocksRecordStore'
                       options.cappedMaxDocs ? options.cappedMaxDocs : -1)
                                                                         ^
In file included from src/mongo/db/modules/rocks/src/rocks_engine.cpp:70:0:
src/mongo/db/modules/rocks/src/rocks_record_store.h:88:11: note:   because the following virtual functions are pure within 'mongo::RocksRecordStore':
     class RocksRecordStore : public RecordStore {
           ^
In file included from src/mongo/db/catalog/index_catalog.h:39:0,
                 from src/mongo/db/catalog/collection.h:43,
                 from src/mongo/db/index/index_descriptor.h:36,
                 from src/mongo/db/modules/rocks/src/rocks_engine.cpp:57:
src/mongo/db/storage/record_store.h:588:18: note: 	virtual void mongo::RecordStore::waitForAllEarlierOplogWritesToBeVisible(mongo::OperationContext*) const
     virtual void waitForAllEarlierOplogWritesToBeVisible(OperationContext* txn) const = 0;
                  ^
src/mongo/db/modules/rocks/src/rocks_engine.cpp:357:62: error: invalid new-expression of abstract class type 'mongo::RocksRecordStore'
                                        _getIdentPrefix(ident));

Works with r3.4.0 & 4.11.2.