コード例 #1
0
ファイル: oplogstarttests.cpp プロジェクト: AndrewCEmil/mongo
        void buildCollection() {
            BSONObj info;
            // Create a collection with specified extent sizes
            BSONObj command = BSON( "create" << collname() << "capped" << true <<
                                    "$nExtents" << extentSizes() << "autoIndexId" << false );
            ASSERT(client()->runCommand(dbname(), command, info));

            // Populate documents.
            for(int i = 0; i < numDocs(); ++i) {
                client()->insert(ns(), BSON( "_id" << i << "ts" << i << "payload" << payload8k() ));
            }
        }
コード例 #2
0
int32_t IndexReader::numDeletedDocs() {
    return (maxDoc() - numDocs());
}