*ソース読み会 〜mongo DB〜 [#td5a45b2]

**ビルド (Mac OS X の場合) [#t7780fb5]

-公式ホームページ( http://www.mongodb.org/about/tutorial/build-mongodb-on-os-x/ )を参考に。
--git を使ってソースを取得
  $ git clone https://github.com/mongodb/mongo.git

-ビルドに Xcode と SCons が必要なのでそれらも取得。
--Xcode は App Store からインストール。
--SCons は homebrew, easy_install, pip から入手可能。
---公式ページ( http://www.scons.org )からも持ってこれる。
---ソースからの場合は以下のように。
  $ python setup.py install --prefix=(インストール先)

-ビルドに scons を使う。( http://www.mongodb.org/about/contributors/scons/ )参照。
--make のように -j による並列コンパイルも可能。
-- -j 無しでだいたい30分かからないくらい。
  $ scons all --opt=off --dbg=on
  $ scons --prefix=(インストール先) install

**実行 [#n76b4379]
-まず mongodb がファイルを保存するディレクトリを作る。
 $ mkdir (DIR_PATH)
-創ったディレクトリを指定してサーバー側を実行。
 $ mongod --dbpath (DIR_PATH)
-動いたのを確認したらクライアント側を実行。
 $ mongo 

*ソース読み会1日目 [#cadad822]
-ばっくとれーす

  Thread [14] (Suspended : Step)  
         mongo::_execCommand() at dbcommands.cpp:1,289 0x10027cb36        
         mongo::Command::execCommand() at dbcommands.cpp:1,476
         0x10027dfd2        
         mongo::_runCommands() at dbcommands.cpp:1,551 0x10027ebaf        
         mongo::runCommands() at new_find.cpp:121 0x10057a520             
         mongo::newRunQuery() at new_find.cpp:438 0x100576ffa             
         mongo::receivedQuery() at instance.cpp:256 0x1003d2211           
         mongo::assembleResponse() at instance.cpp:424 0x1003d0e16        
         mongo::MyMessageHandler::process() at db.cpp:202 0x10001627c     
         mongo::PortMessageServer::handleIncomingMsg() at
         message_server_port.cpp:223 0x10097091d       
         boost::_bi::list1<boost::_bi::value<mongo::PortMessageServer::HandleIncomingMsgParam*>
         >::operator()<void*, void* (*)(void*), boost::_bi::list0> at
         bind.hpp:243 0x100971279   
         <...more frames...>        


-lockしてるぽい?

  Thread [14] (Suspended : Step)    
         mongo::Lock::DBWrite::lockDB() at d_concurrency.cpp:552
         0x100272607      
         DBWrite() at d_concurrency.cpp:601 0x100274426   
         DBWrite() at d_concurrency.cpp:602 0x1002743ad   
         mongo::WriteBatchExecutor::ExecInsertsState::_lockAndCheckImpl()
         at batch_executor.cpp:905 0x100264048    
         mongo::WriteBatchExecutor::ExecInsertsState::lockAndCheck() at
         batch_executor.cpp:936 0x100263a7f                          
         mongo::insertOne() at batch_executor.cpp:962 0x100262e7d    
         mongo::WriteBatchExecutor::execOneInsert() at
         batch_executor.cpp:989 0x100260d91         
         mongo::WriteBatchExecutor::execInserts() at
         batch_executor.cpp:828 0x10026050b       
         mongo::WriteBatchExecutor::bulkExecute() at
         batch_executor.cpp:722 0x10025f75e       
         mongo::WriteBatchExecutor::executeBatch() at
         batch_executor.cpp:244 0x10025e919        
         <...more frames...>    


-insert record

  mongo::MmapV1ExtentManager::recordForV1() at
  mmap_v1_extent_manager.cpp:212 0x100703d4c      
  mongo::RecordStoreV1Base::recordFor() at record_store_v1_base.cpp:103
  0x100736703       
  mongo::RecordStoreV1Base::_insertRecord() at
  record_store_v1_base.cpp:268 0x100737935  
  mongo::RecordStoreV1Base::insertRecord() at
  record_store_v1_base.cpp:249 0x100737779 
  mongo::Collection::_insertDocument() at collection.cpp:219 0x10015c68d  
  mongo::Collection::insertDocument() at collection.cpp:185 0x10015c562   
  mongo::singleInsert() at batch_executor.cpp:1,027 0x100263b1e           
  mongo::insertOne() at batch_executor.cpp:964 0x100262ef3                
  mongo::WriteBatchExecutor::execOneInsert() at batch_executor.cpp:989
  0x100260d91        
  mongo::WriteBatchExecutor::execInserts() at batch_executor.cpp:828
  0x10026050b  
  <...more frames...>

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS