diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-01-22 22:42:45 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-01-22 22:42:45 +0000 |
commit | 3a54f4199f66812b7b9496b91a4aebd47dcb7218 (patch) | |
tree | 90fe9bb4ca0aef5190e65cecfbe21c34559cddfe /src/couchdb/couch_view.erl | |
parent | 6f5985c3eb661574dba97277ef208673023d220c (diff) |
change update=false to stale=ok
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@736837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_view.erl')
-rw-r--r-- | src/couchdb/couch_view.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/couchdb/couch_view.erl b/src/couchdb/couch_view.erl index ce41dd23..3faec4b9 100644 --- a/src/couchdb/couch_view.erl +++ b/src/couchdb/couch_view.erl @@ -41,10 +41,14 @@ get_group_server(DbName, GroupId) -> throw(Error) end. -get_group(Db, GroupId, Update) -> +get_group(Db, GroupId, Stale) -> + MinUpdateSeq = case Stale of + ok -> 0; + _Else -> couch_db:get_update_seq(Db) + end, couch_view_group:request_group( get_group_server(couch_db:name(Db), GroupId), - if Update -> couch_db:get_update_seq(Db); true -> 0 end). + MinUpdateSeq). get_temp_group(Db, Type, MapSrc, RedSrc) -> @@ -136,8 +140,8 @@ get_temp_map_view(Db, Type, Src) -> {ok, #group{views=[View]}} = get_temp_group(Db, Type, Src, []), {ok, View}. -get_map_view(Db, GroupId, Name, Update) -> - case get_group(Db, GroupId, Update) of +get_map_view(Db, GroupId, Name, Stale) -> + case get_group(Db, GroupId, Stale) of {ok, #group{views=Views}} -> get_map_view0(Name, Views); Error -> |