You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/09/12 20:08:57 UTC
[couchdb] 14/28: Update pattern match for clarity
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch COUCHDB-3287-pluggable-storage-engines
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 66e55a7d416f12e99a4c87ae345c2b311fbc34a9
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue May 30 11:32:00 2017 -0500
Update pattern match for clarity
---
src/couch/src/couch_db.erl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 94fc13b..387f205 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -1207,7 +1207,10 @@ set_new_att_revpos(#doc{revs={RevPos,_Revs},atts=Atts0}=Doc) ->
Atts = lists:map(
fun(Att) ->
case couch_att:fetch(data, Att) of
- {_Fd, _Sp} -> Att; % already commited to disk, don't set new rev
+ % already commited to disk, don't set new rev
+ {stream, _} -> Att;
+ {Fd, _} when is_pid(Fd) -> Att;
+ % write required so update RevPos
_ -> couch_att:store(revpos, RevPos+1, Att)
end
end, Atts0),
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.