diff options
author | Damien F. Katz <damien@apache.org> | 2008-08-05 01:43:40 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-08-05 01:43:40 +0000 |
commit | 88ec14c220592c8c0db7869c9961423e9ee97e7c (patch) | |
tree | 67974f234e4a0201302506e3b7c56a73cf909376 /src/couchdb/couch_db.hrl | |
parent | b218a0e7d425f7b3660433a17c6558f676524730 (diff) |
Added concurrent open db limit and a LRU cache for closing old databases when limit reached (configurable via MaxDbsOpen var in couch.ini). Refactored db update code in couch_db.erl into couch_db_updater.erl.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@682560 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.hrl')
-rw-r--r-- | src/couchdb/couch_db.hrl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl index 9ca5d815..0c274396 100644 --- a/src/couchdb/couch_db.hrl +++ b/src/couchdb/couch_db.hrl @@ -69,3 +69,40 @@ % couch_db:open_doc(Db, Id, Options). meta = [] }). + + + + + +-record(db_header, + {write_version = 0, + update_seq = 0, + summary_stream_state = nil, + fulldocinfo_by_id_btree_state = nil, + docinfo_by_seq_btree_state = nil, + local_docs_btree_state = nil, + doc_count=0, + doc_del_count=0 + }). + +-record(db, + {main_pid=nil, + update_pid=nil, + compactor_pid=nil, + fd, + header = #db_header{}, + summary_stream, + fulldocinfo_by_id_btree, + docinfo_by_seq_btree, + local_docs_btree, + update_seq, + doc_count, + doc_del_count, + name, + filepath + }). + + + +% small value used in revision trees to indicate the revision isn't stored +-define(REV_MISSING, []). |