| a | b | |
|---|
| 0 | + | Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:4] [hipe] [kernel-poll:true] |
|---|
| 0 | + | |
|---|
| 0 | + | Eshell V5.8.3 (abort with ^G) |
|---|
| 0 | + | 1> Apache CouchDB 1.2.0a7a6f6ee-git (LogLevel=info) is starting. |
|---|
| 0 | + | Apache CouchDB has started. Time to relax. |
|---|
| 0 | + | [info] [<0.37.0>] Apache CouchDB has started on http://127.0.0.1:5984/ |
|---|
| 0 | + | |
|---|
| 0 | + | 1> rr("src/couchdb/couch_db.hrl"). |
|---|
| 0 | + | [att,btree,changes_args,db,db_header,doc,doc_info, |
|---|
| 0 | + | extern_resp_args,full_doc_info,group,httpd,index_header, |
|---|
| 0 | + | reduce_fold_helper_funs,rev_info,user_ctx,view, |
|---|
| 0 | + | view_fold_helper_funs,view_query_args] |
|---|
| 0 | + | 2> {ok, Db} = couch_db:open_int(<<"large1kb">>, []). |
|---|
| 0 | + | {ok,#db{main_pid = <0.179.0>,update_pid = <0.180.0>, |
|---|
| 0 | + | compactor_pid = nil, |
|---|
| 0 | + | instance_start_time = <<"1301861125471547">>,fd = <0.181.0>, |
|---|
| 0 | + | updater_fd = <0.177.0>,fd_ref_counter = <0.183.0>, |
|---|
| 0 | + | header = #db_header{disk_version = 5,update_seq = 341301, |
|---|
| 0 | + | unused = 0, |
|---|
| 0 | + | fulldocinfo_by_id_btree_state = {480339898,{341298,0}}, |
|---|
| 0 | + | docinfo_by_seq_btree_state = {480336370,341298}, |
|---|
| 0 | + | local_docs_btree_state = {480317540,[]}, |
|---|
| 0 | + | purge_seq = 1,purged_docs = 480340016, |
|---|
| 0 | + | security_ptr = 480321636,revs_limit = 1000}, |
|---|
| 0 | + | committed_update_seq = 341301, |
|---|
| 0 | + | fulldocinfo_by_id_btree = #btree{fd = <0.177.0>, |
|---|
| 0 | + | root = {480339898,{341298,0}}, |
|---|
| 0 | + | extract_kv = #Fun<couch_db_updater.10.91297870>, |
|---|
| 0 | + | assemble_kv = #Fun<couch_db_updater.11.29248762>, |
|---|
| 0 | + | less = #Fun<couch_btree.5.3534514>, |
|---|
| 0 | + | reduce = #Fun<couch_db_updater.12.101621643>}, |
|---|
| 0 | + | docinfo_by_seq_btree = #btree{fd = <0.177.0>, |
|---|
| 0 | + | root = {480336370,341298}, |
|---|
| 0 | + | extract_kv = #Fun<couch_db_updater.13.112240718>, |
|---|
| 0 | + | assemble_kv = #Fun<couch_db_updater.14.90543234>, |
|---|
| 0 | + | less = #Fun<couch_btree.5.3534514>, |
|---|
| 0 | + | reduce = #Fun<couch_db_updater.15.111854220>}, |
|---|
| 0 | + | local_docs_btree = #btree{fd = <0.177.0>, |
|---|
| 0 | + | root = {480317540,[]}, |
|---|
| 0 | + | extract_kv = #Fun<couch_btree.0.8709291>, |
|---|
| 0 | + | assemble_kv = #Fun<couch_btree.1.100429438>, |
|---|
| 0 | + | less = #Fun<couch_btree.2.3534514>,reduce = nil}, |
|---|
| 0 | + | update_seq = 341301,name = <<"large1kb">>, |
|---|
| 0 | + | filepath = "/home/fdmanana/git/hub/couchdb/tmp/lib/large1kb.couch", |
|---|
| 0 | + | validate_doc_funs = [], |
|---|
| 0 | + | security = [{<<"admins">>, |
|---|
| 0 | + | {[{<<"names">>,[]},{<<"roles">>,[<<...>>|...]}]}}, |
|---|
| 0 | + | {<<"members">>,{[{<<"names">>,[]},{<<"role"...>>,[]}]}}], |
|---|
| 0 | + | security_ptr = 480321636, |
|---|
| 0 | + | user_ctx = #user_ctx{name = null,roles = [], |
|---|
| 0 | + | handler = undefined}, |
|---|
| 0 | + | waiting_delayed_commit = nil,revs_limit = 1000, |
|---|
| 0 | + | fsync_options = [before_header,after_header,on_file_open], |
|---|
| 0 | + | options = []}} |
|---|
| 0 | + | 3> |
|---|
| 0 | + | 3> HBin = term_to_binary(Db#db.header). |
|---|
| 0 | + | <<131,104,11,100,0,9,100,98,95,104,101,97,100,101,114,97, |
|---|
| 0 | + | 5,98,0,5,53,53,97,0,104,2,98,28,161,...>> |
|---|
| 0 | + | 4> byte_size(HBin). |
|---|
| 0 | + | 77 |
|---|
| 0 | + | 5> byte_size(element(2, snappy:compress(HBin))). |
|---|
| 0 | + | 69 |
|---|
| 0 | + | 6> byte_size(element(2, snappy:compress(HBin))). |
|---|
| 0 | + | 69 |
|---|
| 0 | + | 7> {ok, Root} = couch_file:pread_binary(Db#db.fd, 480339898). |
|---|
| 0 | + | {ok,<<131,104,2,100,0,7,107,112,95,110,111,100,101,108,0, |
|---|
| 0 | + | 0,0,3,104,2,109,0,0,0,9,100,111,...>>} |
|---|
| 0 | + | 8> RootBin = term_to_binary(Root). |
|---|
| 0 | + | <<131,109,0,0,0,114,131,104,2,100,0,7,107,112,95,110,111, |
|---|
| 0 | + | 100,101,108,0,0,0,3,104,2,109,0,0,...>> |
|---|
| 0 | + | 9> byte_size(RootBin). |
|---|
| 0 | + | 120 |
|---|
| 0 | + | 10> byte_size(element(2, snappy:compress(RootBin))). |
|---|
| 0 | + | 104 |
|---|
| 0 | + | 11> SecBin = term_to_binary(Db#db.security). |
|---|
| 0 | + | <<131,108,0,0,0,2,104,2,109,0,0,0,6,97,100,109,105,110, |
|---|
| 0 | + | 115,104,1,108,0,0,0,2,104,2,109,...>> |
|---|
| 0 | + | 12> byte_size(SecBin). |
|---|
| 0 | + | 127 |
|---|
| 0 | + | 13> byte_size(element(2, snappy:compress(SecBin))). |
|---|
| 0 | + | 80 |
|---|
| 0 | + | 14> {ok, Doc4Json} = file:read_file("../seatoncouch/doc_4k.json"). |
|---|
| 0 | + | {ok,<<"{\n\"data3\":\"ColreUHAtuYoUOx1N4ZloouQt2o6ugnUT6eYtS10gu7niM8i0vEiNufpk1RlMQXaHXlIwQBDsMFDFUQcFeg2vW5eD259Xm\",\n"...>>} |
|---|
| 0 | + | 15> DocBin = term_to_binary(couch_util:json_decode(Doc4Json)). |
|---|
| 0 | + | <<131,104,1,108,0,0,0,9,104,2,109,0,0,0,5,100,97,116,97, |
|---|
| 0 | + | 51,109,0,0,0,94,67,111,108,114,...>> |
|---|
| 0 | + | 16> byte_size(DocBin). |
|---|
| 0 | + | 5942 |
|---|
| 0 | + | 17> byte_size(element(2, snappy:compress(DocBin))). |
|---|
| 0 | + | 2930 |
|---|
| 0 | + | 18> |
|---|
| ... | |
|---|