diff options
author | Damien F. Katz <damien@apache.org> | 2009-01-05 17:03:02 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-01-05 17:03:02 +0000 |
commit | 75e24cb09c6222713224540a1d82b6539c71ac9a (patch) | |
tree | ac0ec8b7457c30a3501aca5711f2f78c205cf74d /src/couchdb/couch_db.erl | |
parent | ae1ad0ae6738783ce15918657fddddcbf176d940 (diff) |
Fixed views to not commit index headers if they are ahead of what has been fully committed to the database. Also, the index headers are now committed async, improving response times updating views.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@731618 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.erl')
-rw-r--r-- | src/couchdb/couch_db.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl index 7c86eeae..c9546240 100644 --- a/src/couchdb/couch_db.erl +++ b/src/couchdb/couch_db.erl @@ -17,7 +17,7 @@ -export([open_ref_counted/2,num_refs/1,monitor/1]). -export([update_doc/3,update_docs/4,update_docs/2,update_docs/3,delete_doc/3]). -export([get_doc_info/2,open_doc/2,open_doc/3,open_doc_revs/4]). --export([get_missing_revs/2,name/1,doc_to_tree/1,get_update_seq/1]). +-export([get_missing_revs/2,name/1,doc_to_tree/1,get_update_seq/1,get_committed_update_seq/1]). -export([enum_docs/4,enum_docs/5,enum_docs_since/4,enum_docs_since/5]). -export([enum_docs_since_reduce_to_count/1,enum_docs_reduce_to_count/1]). -export([increment_update_seq/1,get_purge_seq/1,purge_docs/2,get_last_purged/1]). @@ -147,8 +147,10 @@ increment_update_seq(#db{update_pid=UpdatePid}) -> purge_docs(#db{update_pid=UpdatePid}, IdsRevs) -> gen_server:call(UpdatePid, {purge_docs, IdsRevs}). +get_committed_update_seq(#db{header=#db_header{update_seq=Seq}}) -> + Seq. -get_update_seq(#db{header=#db_header{update_seq=Seq}})-> +get_update_seq(#db{update_seq=Seq})-> Seq. get_purge_seq(#db{header=#db_header{purge_seq=PurgeSeq}})-> |